mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-30 16:41:05 +08:00
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:
parent
31f336183c
commit
ffe782a322
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user