summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes2013-07-06 20:08:53 +0000
committerMichael Meskes2013-07-06 20:10:55 +0000
commit43c3aab123560b326bab894c44b667e2bdddc0e4 (patch)
tree97b33c7ea18c5c76b94109d8524a41f0dbfb5991
parent0cd787802f84583c4086b1af0a74015f230dfb70 (diff)
Also escape double quotes for ECPG's #line statement.
-rw-r--r--src/interfaces/ecpg/preproc/output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c
index 616e8f0400..007c07c034 100644
--- a/src/interfaces/ecpg/preproc/output.c
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -95,7 +95,7 @@ hashline_number(void)
#endif
)
{
- /* "* 2" here is for escaping \s below */
+ /* "* 2" here is for escaping '\' and '"' below */
char *line = mm_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename) * 2);
char *src,
*dest;
@@ -105,7 +105,7 @@ hashline_number(void)
dest = line + strlen(line);
while (*src)
{
- if (*src == '\\')
+ if (*src == '\\' || *src == '"')
*dest++ = '\\';
*dest++ = *src++;
}