From ffe782a322ea81e55d38ce3a057c7ae1536b5fd4 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 5 Jul 2009 15:40:45 -0700 Subject: [PATCH] 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 --- output/outbin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/output/outbin.c b/output/outbin.c index 47d55cac..2aae2fb7 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);