]> git.localhorst.tv Git - l2e.git/commitdiff
fix gcc memcpy warning
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 14 Aug 2013 07:45:50 +0000 (09:45 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 14 Aug 2013 07:46:32 +0000 (09:46 +0200)
src/loader/Interpreter.cpp

index d13c3c6424bfbdd60ccc5cefd19d96f85a56440a..a1fdc8250639ec81ee3e9613e06dcf37ddb401d5 100644 (file)
@@ -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()) {