nRead is not used on error

This commit is contained in:
Boris Zentner 2016-05-22 22:01:20 +02:00 committed by Robin Stuart
parent 7ca22f24a4
commit bfb4d3284b

View File

@ -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;