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
This commit is contained in:
parent
86bd01dfc9
commit
eda7148af2
1 changed files with 2 additions and 2 deletions
|
@ -182,11 +182,11 @@ fixPacket(PacketPtr func, PacketPtr timing)
|
|||
if (funcStart >= timingStart) {
|
||||
memcpy(timing->getPtr<uint8_t>() + (funcStart - timingStart),
|
||||
func->getPtr<uint8_t>(),
|
||||
funcStart - std::min(funcEnd, timingEnd));
|
||||
std::min(funcEnd, timingEnd) - funcStart);
|
||||
} else { // timingStart > funcStart
|
||||
memcpy(timing->getPtr<uint8_t>(),
|
||||
func->getPtr<uint8_t>() + (timingStart - funcStart),
|
||||
timingStart - std::min(funcEnd, timingEnd));
|
||||
std::min(funcEnd, timingEnd) - timingStart);
|
||||
}
|
||||
// we always want to keep going with a write
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue