]> git.sur5r.net Git - cc65/commitdiff
da65: properly scan empty strings 771/head
authorEgor <egor@opensrc.club>
Sat, 6 Oct 2018 15:30:35 +0000 (18:30 +0300)
committerEgor <egor@opensrc.club>
Sat, 6 Oct 2018 18:55:42 +0000 (21:55 +0300)
Previously, doing something like `LABEL { NAME ""; ADDR $1000; };` would
result in $1000 being labeled as NAME: instead of being unnamed.

src/da65/scanner.c

index 143bb263601fdbc1d9653207e9bb4d7aa2548a43..2bb80a8ef15c786c509012277c6c6683652a520a 100644 (file)
@@ -413,6 +413,7 @@ Again:
         case '\"':
             NextChar ();
             I = 0;
+            InfoSVal[0] = '\0';
             while (C != EOF && C != '\"') {
                 if (GetEncodedChar (InfoSVal, &I, sizeof InfoSVal) < 0) {
                     if (C == EOF) {