Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 43c3aab

Browse files
author
Michael Meskes
committed
Also escape double quotes for ECPG's #line statement.
1 parent 0cd7878 commit 43c3aab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/ecpg/preproc/output.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ hashline_number(void)
9595
#endif
9696
)
9797
{
98-
/* "* 2" here is for escaping \s below */
98+
/* "* 2" here is for escaping '\' and '"' below */
9999
char *line = mm_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename) * 2);
100100
char *src,
101101
*dest;
@@ -105,7 +105,7 @@ hashline_number(void)
105105
dest = line + strlen(line);
106106
while (*src)
107107
{
108-
if (*src == '\\')
108+
if (*src == '\\' || *src == '"')
109109
*dest++ = '\\';
110110
*dest++ = *src++;
111111
}

0 commit comments

Comments
 (0)