on master help sign in
Exclude \DEL from C-string literal characters.
8f38baaMatus Tejiscak
src/IRTS/CodegenC.hs+1−1
@@ -114,7 +114,7 @@ showCStr s = '"' : foldr ((++) . showChar) "\"" s
114 showChar c
114 showChar c
115 | ord c < 0x10 = "\\x0" ++ showHex (ord c) ""
115 | ord c < 0x10 = "\\x0" ++ showHex (ord c) ""
116 | ord c < 0x20 = "\\x" ++ showHex (ord c) ""
116 | ord c < 0x20 = "\\x" ++ showHex (ord c) ""
117− | ord c < 0x80 = [c]
117+ | ord c < 0x7f = [c] -- 0x7f = \DEL
118 | ord c < 0x100 = "\\x" ++ showHex (ord c) ""
118 | ord c < 0x100 = "\\x" ++ showHex (ord c) ""
119 | otherwise = error $ "non-8-bit character in string literal: " ++ show c
119 | otherwise = error $ "non-8-bit character in string literal: " ++ show c
120
120