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>
This commit is contained in:
H. Peter Anvin 2009-07-05 15:40:45 -07:00
parent 31f336183c
commit ffe782a322

View File

@ -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);