From 04e4e8797a63c0a89aae9882982cd864213d05ab Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Wed, 14 Aug 2013 09:45:50 +0200 Subject: [PATCH] fix gcc memcpy warning --- src/loader/Interpreter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/loader/Interpreter.cpp b/src/loader/Interpreter.cpp index d13c3c6..a1fdc82 100644 --- a/src/loader/Interpreter.cpp +++ b/src/loader/Interpreter.cpp @@ -385,7 +385,8 @@ void Interpreter::ReadObject(int typeId, int id, char *object, const PropertyLis } } } - std::memcpy(dest, &array.data, sizeof(char *)); + size_t pLen = sizeof(char *); + std::memcpy(dest, &array.data, pLen); dest += sizeof(char *); std::memcpy(dest, &arraySize, sizeof(int)); } else if (i->second->IsLiteral() && !fd.IsReferenced()) { -- 2.39.2