diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index cf8b328a..4c7fc6d2 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,5 +1,7 @@ 2009-07-15 Arnim Laeuger + * src/bus/readmem.c: [ 2815739 ] Fix fwrite call (Jochen Friedrich) + * src/bus/ejtag_dma.c: [ 2815726 ] Fix HALFWORD and BYTE DMA read access (Jochen Friedrich) diff --git a/urjtag/src/bus/readmem.c b/urjtag/src/bus/readmem.c index 3af4505f..6c761361 100644 --- a/urjtag/src/bus/readmem.c +++ b/urjtag/src/bus/readmem.c @@ -119,7 +119,7 @@ urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) { urj_log (URJ_LOG_LEVEL_NORMAL, _("addr: 0x%08llX\r"), (long long unsigned) a); - if (fwrite (b, bc, 1, f) != bc) + if (fwrite (b, bc, 1, f) != 1) { urj_error_set (URJ_ERROR_FILEIO, "fwrite fails"); urj_error_state.sys_errno = ferror(f);