From: Daniel Karbach Date: Wed, 14 Aug 2013 07:45:50 +0000 (+0200) Subject: fix gcc memcpy warning X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=04e4e8797a63c0a89aae9882982cd864213d05ab;p=l2e.git fix gcc memcpy warning --- 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()) {