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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy