[Scummvm-git-logs] scummvm master -> 48220b8ec553d8e67370c5739466f400387c1ba8

digitall 547637+digitall at users.noreply.github.com
Sun Mar 21 15:03:44 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
48220b8ec5 CGE: Fix Memset on non-trivial Structure GCC Compiler Warning


Commit: 48220b8ec553d8e67370c5739466f400387c1ba8
    https://github.com/scummvm/scummvm/commit/48220b8ec553d8e67370c5739466f400387c1ba8
Author: D G Turner (digitall at scummvm.org)
Date: 2021-03-21T15:01:26Z

Commit Message:
CGE: Fix Memset on non-trivial Structure GCC Compiler Warning

Changed paths:
    engines/cge/cge_main.cpp


diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 488e237290..f065234f84 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -491,7 +491,11 @@ void CGEEngine::loadHeroXY() {
 	EncryptedStream cf(this, "CGE.HXY");
 	uint16 x, y;
 
-	memset(_heroXY, 0, sizeof(_heroXY));
+	for (uint i = 0; i < ARRAYSIZE(_heroXY); i++) {
+		_heroXY[i].x = 0;
+		_heroXY[i].y = 0;
+	}
+
 	if (!cf.err()) {
 		for (int i = 0; i < kSceneMax; ++i) {
 			cf.read((byte *)&x, 2);




More information about the Scummvm-git-logs mailing list