diff options
Diffstat (limited to 'sim/ppc/hw_init.c')
-rw-r--r-- | sim/ppc/hw_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/ppc/hw_init.c b/sim/ppc/hw_init.c index b486f6f..86e753c 100644 --- a/sim/ppc/hw_init.c +++ b/sim/ppc/hw_init.c @@ -47,7 +47,7 @@ dma_file(device *me, count = 0; while (1) { inc = fread(buf, 1, sizeof(buf), image); - if (feof(image) || ferror(image)) + if (inc <= 0) break; if (device_dma_write_buffer(device_parent(me), buf, |