From f4d172df2f4e41fc647e42e209f3d45fbf6f86e3 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 21 Mar 2020 00:15:42 +1000 Subject: [PATCH] DMA: Fix underflow when block_count == 0 --- src/core/dma.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dma.cpp b/src/core/dma.cpp index 7007b53fd..1ddd1bf80 100644 --- a/src/core/dma.cpp +++ b/src/core/dma.cpp @@ -356,7 +356,7 @@ void DMA::TransferChannel(Channel channel, TickCount ticks_late) copy_to_device ? "from" : "to", current_address); const u32 block_size = cs.block_control.request.GetBlockSize(); - u32 blocks_remaining = cs.block_control.request.block_count; + u32 blocks_remaining = cs.block_control.request.GetBlockCount(); if (copy_to_device) {