From eda7148af25e8e106e8983fb37952263dcae5275 Mon Sep 17 00:00:00 2001 From: Ron Dreslinski Date: Wed, 25 Oct 2006 14:14:37 -0400 Subject: Fix fixPacket functionality to calculate sizes properly src/mem/packet.cc: Copy size is calculated by END-BEGIN not BEGIN-END --HG-- extra : convert_revision : 0e2725c5551f8f70ff05cb285e0822afc0bb3f87 --- src/mem/packet.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mem/packet.cc b/src/mem/packet.cc index fa8d82c46..a342af634 100644 --- a/src/mem/packet.cc +++ b/src/mem/packet.cc @@ -182,11 +182,11 @@ fixPacket(PacketPtr func, PacketPtr timing) if (funcStart >= timingStart) { memcpy(timing->getPtr() + (funcStart - timingStart), func->getPtr(), - funcStart - std::min(funcEnd, timingEnd)); + std::min(funcEnd, timingEnd) - funcStart); } else { // timingStart > funcStart memcpy(timing->getPtr(), func->getPtr() + (timingStart - funcStart), - timingStart - std::min(funcEnd, timingEnd)); + std::min(funcEnd, timingEnd) - timingStart); } // we always want to keep going with a write return true; -- cgit v1.2.3