diff -r de20086a6bcc -r 7c080e5ac8d0 tools/pas2c.hs --- a/tools/pas2c.hs Thu May 10 23:51:05 2012 +0400 +++ b/tools/pas2c.hs Fri May 11 00:28:06 2012 +0400 @@ -692,7 +692,10 @@ expr2C (HexNumber s) = return $ text "0x" <> (text . map toLower $ s) expr2C (StringLiteral [a]) = do modify(\s -> s{lastType = BTChar}) - return . quotes $ text [a] + return . quotes . text $ escape a + where + escape '\'' = "\\\'" + escape a = [a] expr2C (StringLiteral s) = addStringConst s expr2C (Reference ref) = ref2CF ref expr2C (PrefixOp op expr) = do