mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
C codegen: escape '?' because C has trigraphs
This commit is contained in:
@@ -532,7 +532,7 @@ var
|
||||
proc toCChar*(c: char): string =
|
||||
case c
|
||||
of '\0'..'\x1F', '\x80'..'\xFF': result = '\\' & toOctal(c)
|
||||
of '\'', '\"', '\\': result = '\\' & c
|
||||
of '\'', '\"', '\\', '?': result = '\\' & c
|
||||
else: result = $(c)
|
||||
|
||||
proc makeCString*(s: string): Rope =
|
||||
|
||||
Reference in New Issue
Block a user