Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cobj/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,12 @@ static enum cb_string_category get_string_category(const unsigned char *s,
}
#else
} else if ((0x81 <= c && c <= 0x9f) || (0xe0 <= c && c <= 0xef)) {
i += 2;
category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII;
if (i + 1 < size) {
i += 2;
category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII;
} else {
return CB_STRING_CATEGORY_CONTAINS_UNCOMMON;
}
#endif
} else {
return CB_STRING_CATEGORY_CONTAINS_UNCOMMON;
Expand Down
1 change: 0 additions & 1 deletion tests/i18n_sjis.src/pic-x.at
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 8a
AT_CLEANUP

AT_SETUP([Move with trunc and trimming 1])
AT_CHECK([${SKIP_TEST}])

AT_DATA([prog.cob], [
IDENTIFICATION DIVISION.
Expand Down