From 43c3aab123560b326bab894c44b667e2bdddc0e4 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Sat, 6 Jul 2013 22:08:53 +0200 Subject: [PATCH] Also escape double quotes for ECPG's #line statement. --- src/interfaces/ecpg/preproc/output.c | 4 ++-- 1 file 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++; } -- 2.40.0