mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-19 18:00:23 +08:00
RAA fix from theowl
This commit is contained in:
parent
24cfef4f8f
commit
c2f156e451
@ -369,7 +369,7 @@ void raa_free (struct RAA *r)
|
||||
|
||||
long raa_read (struct RAA *r, long posn)
|
||||
{
|
||||
if (posn > r->stepsize * LAYERSIZ(r))
|
||||
if (posn >= r->stepsize * LAYERSIZ(r))
|
||||
return 0; /* Return 0 for undefined entries */
|
||||
while (r->layers > 0) {
|
||||
ldiv_t l;
|
||||
@ -389,7 +389,7 @@ struct RAA *raa_write (struct RAA *r, long posn, long value)
|
||||
if (posn < 0)
|
||||
nasm_malloc_error (ERR_PANIC, "negative position in raa_write");
|
||||
|
||||
while (r->stepsize * LAYERSIZ(r) < posn) {
|
||||
while (r->stepsize * LAYERSIZ(r) <= posn) {
|
||||
/*
|
||||
* Must add a layer.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user