summaryrefslogtreecommitdiff
path: root/nasmlib.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-09-12 22:03:10 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-09-12 22:03:10 +0000
commitc2f156e4512bc1a30e19f81a37a05dab096401e4 (patch)
treeb38781621b4dabdb44a4e1e1f65372e4640b2f37 /nasmlib.c
parent24cfef4f8f7ee01f841e86972001b06acae243ea (diff)
downloadnasm-c2f156e4512bc1a30e19f81a37a05dab096401e4.tar.gz
nasm-c2f156e4512bc1a30e19f81a37a05dab096401e4.tar.bz2
nasm-c2f156e4512bc1a30e19f81a37a05dab096401e4.zip
RAA fix from theowl
Diffstat (limited to 'nasmlib.c')
-rw-r--r--nasmlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nasmlib.c b/nasmlib.c
index b1bc430..bb0ab29 100644
--- a/nasmlib.c
+++ b/nasmlib.c
@@ -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.
*/