fixed bug in handling quotes
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 12 Apr 2003 16:08:56 +0000 (16:08 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 12 Apr 2003 16:08:56 +0000 (16:08 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2513 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCmacro.c

index 9e0d87c0b5bb4ddb666291065a7a372e0a4ef216..7e112b04bb23bb64e5ccf3ec9fc577ceede1f32a 100644 (file)
@@ -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;