diff --git a/dma-helpers.c b/dma-helpers.c index 13593d1b428e8273e2d9291f96983db8081eeb75..433d8b21b344d7eaa8ffee840d2bc62eefb269fc 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -24,8 +24,8 @@ static void do_dma_memory_set(dma_addr_t addr, uint8_t c, dma_addr_t len) while (len > 0) { l = len < FILLBUF_SIZE ? len : FILLBUF_SIZE; cpu_physical_memory_rw(addr, fillbuf, l, true); - len -= len; - addr += len; + len -= l; + addr += l; } }