Fix leak in compiler when a truncated escape sequence is encountered

This commit is contained in:
K. Lange 2021-03-12 19:42:02 +09:00
parent 307f5e7200
commit d3a614869a

View File

@ -1915,6 +1915,7 @@ static void string(int type) {
for (size_t i = 0; i < n; ++i) { \
if (c + i + 2 == end || !isHex(c[i+2])) { \
error("truncated \\%c escape", type); \
FREE_ARRAY(char,stringBytes,stringCapacity); \
return; \
} \
tmpbuf[i] = c[i+2]; \