diff --git a/ff_file.c b/ff_file.c index 87bb31e..fbae1da 100644 --- a/ff_file.c +++ b/ff_file.c @@ -2447,6 +2447,11 @@ int32_t FF_Write( FF_FILE * pxFile, } } + if( FF_isERR( xError ) ) + { + break; + } + /*---------- Write (memcpy) Remaining Bytes */ if( ulBytesLeft == 0 ) {