Proposed fix for bug #182 (ds.X doesn't work with relative expressions)

This commit is contained in:
ggn 2021-03-06 20:18:43 +02:00 committed by Shamus Hammons
parent ca744716ef
commit 0d82e7a797
1 changed files with 4 additions and 3 deletions

View File

@ -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