From 24762d487c30cdf7f0760356ce85a689afcbcaac Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 27 May 2002 02:19:43 +0000 Subject: [PATCH] Correct handling of SEG ; per BR 560575 --- eval.c | 2 ++ test/br560575.asm | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 test/br560575.asm diff --git a/eval.c b/eval.c index 72bb4d0..28aca64 100644 --- a/eval.c +++ b/eval.c @@ -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 0000000..8e02ddd --- /dev/null +++ b/test/br560575.asm @@ -0,0 +1,6 @@ +; +; Test for bug report 560575 +; + dw seg ~1 + dw seg "a" + dw seg 'a' -- 2.7.4