Fix incorrect reference in Lua encoding (#324)

This commit is contained in:
Paul Kulchenko 2021-11-13 13:10:09 -08:00 committed by GitHub
parent 1d6216a775
commit fdb543cbb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4763,8 +4763,8 @@ static void EscapeLuaString(char *s, size_t len, char **buf) {
if (s[i] == '\\' || s[i] == '\"' || s[i] == '\n' ||
s[i] == '\0' || s[i] == '\r') {
appendw(buf, '\\' | 'x' << 010 |
"0123456789abcdef"[(c & 0xF0) >> 4] << 020 |
"0123456789abcdef"[(c & 0x0F) >> 0] << 030);
"0123456789abcdef"[(s[i] & 0xF0) >> 4] << 020 |
"0123456789abcdef"[(s[i] & 0x0F) >> 0] << 030);
} else {
appendd(buf, s+i, 1);
}