summaryrefslogtreecommitdiff
path: root/src/mem/packet.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/packet.cc')
-rw-r--r--src/mem/packet.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem/packet.cc b/src/mem/packet.cc
index 8bbd7ff18..9dd67746b 100644
--- a/src/mem/packet.cc
+++ b/src/mem/packet.cc
@@ -303,11 +303,11 @@ Packet::checkFunctional(Printable *obj, Addr addr, bool is_secure, int size,
}
} else if (isWrite()) {
if (offset >= 0) {
- memcpy(data + offset, getPtr<uint8_t>(),
+ memcpy(data + offset, getConstPtr<uint8_t>(),
(min(func_end, val_end) - func_start) + 1);
} else {
// val_start > func_start
- memcpy(data, getPtr<uint8_t>() - offset,
+ memcpy(data, getConstPtr<uint8_t>() - offset,
(min(func_end, val_end) - val_start) + 1);
}
} else {