From c2f156e4512bc1a30e19f81a37a05dab096401e4 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 12 Sep 2002 22:03:10 +0000 Subject: [PATCH] RAA fix from theowl --- nasmlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nasmlib.c b/nasmlib.c index b1bc4309..bb0ab29e 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. */ -- 2.11.4.GIT