Skip to content
Permalink
Browse files
lexer: fix handling of \092 escape sequence in strings
  • Loading branch information
davidm committed Nov 26, 2011
1 parent 18218ab commit a8d75dc
Showing 1 changed file with 3 additions and 1 deletion.
@@ -230,7 +230,9 @@ local function unescape_string (s)
error ("Illegal escape sequence '\\"..digits..
"' in string: ASCII codes must be in [0..255]")
end
return backslashes .. string.char (code)
local c = string.char (code)
if c == '\\' then c = '\\\\' end -- parsed by unesc_letter (test: "\092b" --> "\\b")
return backslashes .. c
end

-- Take a letter [x], and returns the character represented by the

0 comments on commit a8d75dc

Please sign in to comment.