From: borutr Date: Sat, 12 Apr 2003 16:08:56 +0000 (+0000) Subject: fixed bug in handling quotes X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=528e6548de4de7e1b89062603ba24fbffc56fbd1;hp=cacc4fe9907bd274334fe7e08eb60cca052e2323;p=fw%2Fsdcc fixed bug in handling quotes git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2513 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCmacro.c b/src/SDCCmacro.c index 9e0d87c0..7e112b04 100644 --- a/src/SDCCmacro.c +++ b/src/SDCCmacro.c @@ -46,6 +46,10 @@ _evalMacros(char *apinto, hTab *pvals, const char *pfrom, size_t alen) switch (*pfrom) { case '"': case '\'': + if (quote != '\0') { + /* write previous quote */ + *pinto++ = quote; + } quote = *pfrom; ++pfrom; break; @@ -104,6 +108,7 @@ _evalMacros(char *apinto, hTab *pvals, const char *pfrom, size_t alen) } } + quote = '\0'; pfrom = pend + 1; } break;