[Scummvm-git-logs] scummvm master -> 6769b2b93bbcd38d1b7252869b0353248710412f

digitall 547637+digitall at users.noreply.github.com
Mon Mar 22 13:51:41 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:
6769b2b93b STARTREK: Fix Memset on Non-Trivial Structure GCC Compiler Warnings


Commit: 6769b2b93bbcd38d1b7252869b0353248710412f
    https://github.com/scummvm/scummvm/commit/6769b2b93bbcd38d1b7252869b0353248710412f
Author: D G Turner (digitall at scummvm.org)
Date: 2021-03-22T13:51:16Z

Commit Message:
STARTREK: Fix Memset on Non-Trivial Structure GCC Compiler Warnings

Changed paths:
    engines/startrek/space.cpp


diff --git a/engines/startrek/space.cpp b/engines/startrek/space.cpp
index 85d0f25d8b..815c010ff5 100644
--- a/engines/startrek/space.cpp
+++ b/engines/startrek/space.cpp
@@ -42,7 +42,10 @@ void StarTrekEngine::initStarfield(int16 x, int16 y, int16 width, int16 height,
 	_starfieldRect.top = _starfieldYVar1 - _starfieldYVar2;
 	_starfieldRect.bottom = _starfieldYVar1 + _starfieldYVar2;
 
-	memset(_starList, 0, sizeof(_starList));
+	for (uint i = 0; i < ARRAYSIZE(_starList); i++) {
+		_starList[i].active = false;
+		_starList[i].pos = Point3(0, 0, 0);
+	}
 	_starfieldPointDivisor = 150;
 	_flt_50898 = 50.0;
 }




More information about the Scummvm-git-logs mailing list