diff options
author | Jason Wright <jason@cvs.openbsd.org> | 1998-11-16 00:52:33 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 1998-11-16 00:52:33 +0000 |
commit | e8fb880e57e7e5672a796526cb3e94385fbfbf44 (patch) | |
tree | fb05bcff9b2106ce53e9e25c84838f357809263c | |
parent | 2842ca4933187ba09de7fc8eb9a0ea4f663ae31f (diff) |
Fix `L2-L1' expression evaluation botch; from NetBSD.
-rw-r--r-- | gnu/usr.bin/gas/expr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gnu/usr.bin/gas/expr.c b/gnu/usr.bin/gas/expr.c index fa62c23274a..5926b528b32 100644 --- a/gnu/usr.bin/gas/expr.c +++ b/gnu/usr.bin/gas/expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expr.c,v 1.5 1998/02/17 12:44:16 deraadt Exp $ */ +/* $OpenBSD: expr.c,v 1.6 1998/11/16 00:52:32 jason Exp $ */ /* expr.c -operands, expressions- Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. @@ -27,7 +27,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: expr.c,v 1.5 1998/02/17 12:44:16 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: expr.c,v 1.6 1998/11/16 00:52:32 jason Exp $"; #endif #include <ctype.h> @@ -847,7 +847,9 @@ segT expr(rank, resultP) * expression is given the segment of right expression (always a DIFFERENCE, * which should get resolved by fixup_segment()) */ - if (resultP->X_got_symbol) { + if (resultP->X_got_symbol && + right.X_add_symbol != NULL && + right.X_subtract_symbol != NULL) { resultP->X_add_symbol = right.X_add_symbol; resultP->X_subtract_symbol = right.X_subtract_symbol; seg1 = S_GET_SEGMENT(right.X_add_symbol); |