diff options
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/packet.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 48b80879e..41edef8a7 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -705,7 +705,8 @@ class Packet : public FastAlloc, public Printable void setData(uint8_t *p) { - std::memcpy(getPtr<uint8_t>(), p, getSize()); + if (p != getPtr<uint8_t>()) + std::memcpy(getPtr<uint8_t>(), p, getSize()); } /** |