From bf5846dcd7d0c7c7cd34982bae5860cb2bfd2415 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 26 Aug 2019 00:36:59 +0100 Subject: DM: Fix GCC Compiler Warnings from Structure memset Usage. --- engines/dm/dungeonman.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp index 7d7b80685e..23648e9c4d 100644 --- a/engines/dm/dungeonman.cpp +++ b/engines/dm/dungeonman.cpp @@ -1218,7 +1218,9 @@ Thing DungeonMan::getUnusedThing(uint16 thingType) { break; } } - memset(thingPtr, 0, thingDataByteCount * 2); + for (uint16 i = 0; i < thingDataByteCount; i++) { + thingPtr[i].set(0); + } *thingPtr = _vm->_thingEndOfList; return curThing; -- cgit v1.2.3