fix out-of-bounds load on empty replxx line
`chars[0] == ')'` was branching on empty data; not UB due to custom heap usage and the code that does run is harmless, but still hit under valgrind
This commit is contained in:
parent
bdb5781ef7
commit
d1469df96b
@ -260,6 +260,8 @@ static NOINLINE i64 readInt(char** p) {
|
||||
return c;
|
||||
}
|
||||
NOINLINE void completion_impl(const char* inp, void* res, bool hint, int* dist) {
|
||||
if (!*inp) return;
|
||||
|
||||
CATCH_OOM(return)
|
||||
B inpB = toC32Any(utf8Decode0(inp));
|
||||
u32* chars = c32any_ptr(inpB);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user