mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-19 02:47:06 +00:00
Include string terminator when keeping track of b256 encoded characters
bug report and patch by brunt, ticket #48
This commit is contained in:
@@ -250,7 +250,7 @@ static void dminsert(char binary_string[], const int posn, const char newbit) {
|
|||||||
int i, end;
|
int i, end;
|
||||||
|
|
||||||
end = (int) strlen(binary_string);
|
end = (int) strlen(binary_string);
|
||||||
for (i = end; i > posn; i--) {
|
for (i = end + 1; i > posn; i--) {
|
||||||
binary_string[i] = binary_string[i - 1];
|
binary_string[i] = binary_string[i - 1];
|
||||||
}
|
}
|
||||||
binary_string[posn] = newbit;
|
binary_string[posn] = newbit;
|
||||||
|
|||||||
Reference in New Issue
Block a user