Revision 7d515c1d loader.c
b/loader.c | ||
---|---|---|
90 | 90 |
while (nbytes) { |
91 | 91 |
want = nbytes > sizeof(buf) ? sizeof(buf) : nbytes; |
92 | 92 |
did = fread(buf, 1, want, f); |
93 |
if (did != want) break; |
|
94 | 93 |
|
95 | 94 |
cpu_physical_memory_write_rom(dst_addr, buf, did); |
96 | 95 |
dst_addr += did; |
97 | 96 |
nbytes -= did; |
97 |
if (did != want) |
|
98 |
break; |
|
98 | 99 |
} |
99 | 100 |
return dst_addr - dst_begin; |
100 | 101 |
} |
Also available in: Unified diff