From: ggn Date: Sat, 6 Mar 2021 18:18:43 +0000 (+0200) Subject: Proposed fix for bug #182 (ds.X doesn't work with relative expressions) X-Git-Tag: v2.1.14~3 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=0d82e7a7971bdd5ac46afdddec6f7906f774af4d Proposed fix for bug #182 (ds.X doesn't work with relative expressions) --- diff --git a/direct.c b/direct.c index 809bb79..e091bf8 100644 --- a/direct.c +++ b/direct.c @@ -1137,6 +1137,7 @@ int d_ds(WORD siz) DEBUG { printf("Directive: .ds.[size] = %u, sloc = $%X\n", siz, sloc); } uint64_t eval; + WORD eattr; if ((cursect & (M6502 | M56KPXYL)) == 0) { @@ -1144,9 +1145,9 @@ int d_ds(WORD siz) auto_even(); } - if (abs_expr(&eval) != OK) - return 0; - + if (expr(exprbuf, &eval, &eattr, NULL) < 0) + return ERROR; + // Check to see if the value being passed in is negative (who the hell does // that?--nobody does; it's the code gremlins, or rum, what does it) // N.B.: Since 'eval' is of type uint64_t, if it goes negative, it will