diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-05-27 02:19:43 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-05-27 02:19:43 +0000 |
commit | 24762d487c30cdf7f0760356ce85a689afcbcaac (patch) | |
tree | 91f69bae93f37a8ee93f9edf0d4d8547097bb50b | |
parent | d4bc3f54ecf1a962bb1b2f270690ba35c2de8c96 (diff) | |
download | nasm-24762d487c30cdf7f0760356ce85a689afcbcaac.tar.gz |
Correct handling of SEG <nonsegment>; per BR 560575
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | test/br560575.asm | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -655,6 +655,8 @@ static expr *expr6(int critical) if (!e) return NULL; e = segment_part(e); + if (!e) + return NULL; if (is_unknown(e) && critical) { error(ERR_NONFATAL, "unable to determine segment base"); return NULL; diff --git a/test/br560575.asm b/test/br560575.asm new file mode 100644 index 00000000..8e02ddd2 --- /dev/null +++ b/test/br560575.asm @@ -0,0 +1,6 @@ +; +; Test for bug report 560575 +; + dw seg ~1 + dw seg "a" + dw seg 'a' |