We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6121a84 commit bdaca6aCopy full SHA for bdaca6a
src/core/s-crc.c
@@ -169,7 +169,11 @@ static REBCNT *CRC32_Table = 0;
169
170
for (; ulen > 0; str++, ulen--) {
171
n = *str;
172
- if (n > 127 && NZ(m = Decode_UTF8_Char(&str, &ulen))) n = m; // mods str, ulen
+ if (n > 127) {
173
+ m = Decode_UTF8_Char(&str, &ulen); // mods str, ulen
174
+ if (!m) Trap0(RE_INVALID_CHARS);
175
+ n = m;
176
+ }
177
if (n < UNICODE_CASES) n = LO_CASE(n);
178
n = (REBYTE)((hash >> CRCSHIFTS) ^ (REBYTE)n); // drop upper 8 bits
179
hash = MASK_CRC(hash << 8) ^ (REBINT)CRC24_Table[n];
0 commit comments