avoid overflow
This commit is contained in:
parent
55deb884d4
commit
b13dc6812c
@ -330,12 +330,12 @@ Atom Yap_LookupMaybeWideAtomWithLength(
|
|||||||
while (i < len0) {
|
while (i < len0) {
|
||||||
// primary support for atoms with null chars
|
// primary support for atoms with null chars
|
||||||
wchar_t c = atom[i];
|
wchar_t c = atom[i];
|
||||||
if (c > 255) {
|
if (c >= 255) {
|
||||||
wide = TRUE;
|
wide = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (c == '\0') {
|
if (c == '\0') {
|
||||||
len0 = i;
|
wide = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
Reference in New Issue
Block a user