mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-09 13:41:59 -04:00
library: move check for valid UTF-8 after de-escaping
CODE128: fix bad index 0 -> i in `c128_glyph_count()`
This commit is contained in:
parent
7e6da28761
commit
71b2dc50b7
5 changed files with 51 additions and 49 deletions
|
@ -346,7 +346,7 @@ static int c128_glyph_count(const unsigned char source[], const int length, cons
|
|||
for (i = 0; i < length; i++) {
|
||||
if (set[i] != current_set) {
|
||||
/* Latch different code set */
|
||||
switch (set[0]) {
|
||||
switch (set[i]) {
|
||||
case 'A':
|
||||
case 'b': /* Manual switching can cause immediate shift */
|
||||
if (current_set != 'A') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue