summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-07-05 15:40:45 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-07-05 15:40:45 -0700
commitffe782a322ea81e55d38ce3a057c7ae1536b5fd4 (patch)
tree4eafd008a829df1cd46480c4adb633ba312289a0
parent31f336183cee2c7f7766f4e207fe530efdc16d52 (diff)
downloadnasm-ffe782a322ea81e55d38ce3a057c7ae1536b5fd4.tar.gz
nasm-ffe782a322ea81e55d38ce3a057c7ae1536b5fd4.tar.bz2
nasm-ffe782a322ea81e55d38ce3a057c7ae1536b5fd4.zip
outbin: when using saa_rnbytes() we have to saa_rewind()
Using saa_fpwrite() to dump a section to a file automatically does saa_rewind(), but if we use saa_rnbytes() to do bit by bit then we manually need to to saa_rewind() before we start. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--output/outbin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/output/outbin.c b/output/outbin.c
index 47d55ca..2aae2fb 100644
--- a/output/outbin.c
+++ b/output/outbin.c
@@ -1534,6 +1534,7 @@ static void do_output_ith(void)
addr = s->start;
length = s->length;
+ saa_rewind(s->contents);
while (length) {
if ((addr^last) & 0xffff0000) {
@@ -1652,6 +1653,7 @@ static void do_output_srec(void)
addr = s->start;
length = s->length;
+ saa_rewind(s->contents);
while (length) {
chunk = 32 - (addr & 31);