avoid overflow

This commit is contained in:
V'itor Santos Costa 2016-02-11 05:53:47 -08:00
parent 55deb884d4
commit b13dc6812c

View File

@ -330,12 +330,12 @@ Atom Yap_LookupMaybeWideAtomWithLength(
while (i < len0) {
// primary support for atoms with null chars
wchar_t c = atom[i];
if (c > 255) {
wide = TRUE;
if (c >= 255) {
wide = true;
break;
}
if (c == '\0') {
len0 = i;
wide = true;
break;
}
i++;