mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-25 21:05:58 +00:00
nRead is not used on error
This commit is contained in:
committed by
Robin Stuart
parent
7ca22f24a4
commit
bfb4d3284b
@@ -1241,7 +1241,6 @@ int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename) {
|
|||||||
n = fread(buffer + nRead, 1, fileLen - nRead, file);
|
n = fread(buffer + nRead, 1, fileLen - nRead, file);
|
||||||
if (ferror(file)) {
|
if (ferror(file)) {
|
||||||
strcpy(symbol->errtxt, strerror(errno));
|
strcpy(symbol->errtxt, strerror(errno));
|
||||||
nRead = 0;
|
|
||||||
return ZINT_ERROR_INVALID_DATA;
|
return ZINT_ERROR_INVALID_DATA;
|
||||||
}
|
}
|
||||||
nRead += n;
|
nRead += n;
|
||||||
|
|||||||
Reference in New Issue
Block a user