diff --git a/releasenotes.md b/releasenotes.md index fae886856..5236e213c 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -47,6 +47,7 @@ - Miscompilation: global struct with vector could generate an incorrect initializer. - `String.tokenize_all` would yield one too many empty tokens at the end. - `String.replace` no longer depends on `String.split`. +- Fix the case where `\u` could crash the compiler on some platforms. ### Stdlib changes - Add `ThreadPool` join function to wait for all threads to finish in the pool without destroying the threads. diff --git a/src/utils/lib.h b/src/utils/lib.h index d49203041..c16df6afb 100644 --- a/src/utils/lib.h +++ b/src/utils/lib.h @@ -609,7 +609,7 @@ static char hex_conv[256] = { static inline int char_hex_to_nibble(char c) { - return hex_conv[(unsigned)c] - 1; + return hex_conv[(unsigned char)c] - 1; } static inline bool char_is_hex_or_(char c)