mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Fix batch bugs: 1) interpretation of former code included in next if shorter, wrong eof detection issed wrong warning
This commit is contained in:
parent
36a2830562
commit
994c5adb10
@ -88,7 +88,7 @@ void ZBarcode_Clear(struct zint_symbol *symbol)
|
|||||||
}
|
}
|
||||||
symbol->rows = 0;
|
symbol->rows = 0;
|
||||||
symbol->width = 0;
|
symbol->width = 0;
|
||||||
symbol->text[0] = '\0';
|
memset(symbol->text,0,128);
|
||||||
symbol->errtxt[0] = '\0';
|
symbol->errtxt[0] = '\0';
|
||||||
if (symbol->bitmap != NULL)
|
if (symbol->bitmap != NULL)
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,12 @@ int batch_process(struct zint_symbol *symbol, char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
character = fgetc(file);
|
int intChar;
|
||||||
|
intChar = fgetc(file);
|
||||||
|
if (intChar == EOF) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
character = (unsigned char) intChar;
|
||||||
if(character == '\n') {
|
if(character == '\n') {
|
||||||
if(buffer[posn - 1] == '\r') {
|
if(buffer[posn - 1] == '\r') {
|
||||||
/* CR+LF - assume Windows formatting and remove CR */
|
/* CR+LF - assume Windows formatting and remove CR */
|
||||||
|
Loading…
Reference in New Issue
Block a user