p--;
if (*p)
*p++ = '\0';
- if (lvl)
+ if (lvl && !defining)
error(ERR_NONFATAL, "unterminated %[ construct");
type = TOK_INDIRECT;
} else if (*p == '?') {
p = nasm_skip_string(p);
if (*p)
p++;
- else
+ else if(!defining)
error(ERR_NONFATAL|ERR_PASS1, "unterminated %! string");
} else {
/* %! without string or identifier */
if (*p) {
p++;
- } else {
+ } else if(!defining) {
error(ERR_WARNING|ERR_PASS1, "unterminated string");
/* Handling unterminated strings by UNV */
/* type = -1; */