mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Extra \0 in preprocessed makes string too long
This commit is contained in:
parent
0cfcc41bb4
commit
22dec4892c
@ -447,7 +447,7 @@ void to_latin1(unsigned char source[], unsigned char preprocessed[])
|
||||
j = 0;
|
||||
i = 0;
|
||||
next = 0;
|
||||
do {
|
||||
while (i < input_length) {
|
||||
if(source[i] < 128) {
|
||||
preprocessed[j] = source[i];
|
||||
j++;
|
||||
@ -465,7 +465,7 @@ void to_latin1(unsigned char source[], unsigned char preprocessed[])
|
||||
}
|
||||
}
|
||||
i = next;
|
||||
} while(i < input_length);
|
||||
}
|
||||
preprocessed[j] = '\0';
|
||||
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user