preproc.c: placate tokenize() warnings during expansion definition
authorKeith Kanios <keith@kanios.net>
Sat, 18 Dec 2010 16:54:39 +0000 (10:54 -0600)
committerKeith Kanios <keith@kanios.net>
Sat, 18 Dec 2010 16:54:39 +0000 (10:54 -0600)
preproc.c

index 64daa40e7431bba935948c4b2ebceb6f9735b0ea..91137ad3511693985eb3f325f9d6c62629fdd779 100644 (file)
--- a/preproc.c
+++ b/preproc.c
@@ -985,7 +985,7 @@ static Token *tokenize(char *line)
                 p--;
                 if (*p)
                     *p++ = '\0';
-                if (lvl)
+                if (lvl && !defining)
                     error(ERR_NONFATAL, "unterminated %[ construct");
                 type = TOK_INDIRECT;
             } else if (*p == '?') {
@@ -1006,7 +1006,7 @@ static Token *tokenize(char *line)
                     p = nasm_skip_string(p);
                     if (*p)
                         p++;
-                    else
+                    else if(!defining)
                         error(ERR_NONFATAL|ERR_PASS1, "unterminated %! string");
                 } else {
                     /* %! without string or identifier */
@@ -1039,7 +1039,7 @@ static Token *tokenize(char *line)
 
             if (*p) {
                 p++;
-            } else {
+            } else if(!defining) {
                 error(ERR_WARNING|ERR_PASS1, "unterminated string");
                 /* Handling unterminated strings by UNV */
                 /* type = -1; */