mirror of
https://github.com/janet-lang/janet
synced 2025-11-18 00:05:13 +00:00
Fix some issues found with -fsanitize=undefined
Leave in issues with calling memcpy with size=0. If these become a problem, will probably add a janet_memcpy as memcpy is used so much in the code without 0 checks.
This commit is contained in:
@@ -49,7 +49,7 @@ static const uint32_t symchars[8] = {
|
||||
/* Check if a character is a valid symbol character
|
||||
* symbol chars are A-Z, a-z, 0-9, or one of !$&*+-./:<=>@\^_~| */
|
||||
static int is_symbol_char(uint8_t c) {
|
||||
return symchars[c >> 5] & (1 << (c & 0x1F));
|
||||
return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
|
||||
}
|
||||
|
||||
/* Validate some utf8. Useful for identifiers. Only validates
|
||||
|
||||
Reference in New Issue
Block a user