[Scummvm-git-logs] scummvm master -> 576c4115b75415d069f548a3cc3c5969e483b2ff

kelmer44 noreply at scummvm.org
Fri May 22 14:23:36 UTC 2026


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

Summary:
576c4115b7 PELROCK: Initialize all variables for Description, Anim and PaletteAnims. PVS-Studio V730


Commit: 576c4115b75415d069f548a3cc3c5969e483b2ff
    https://github.com/scummvm/scummvm/commit/576c4115b75415d069f548a3cc3c5969e483b2ff
Author: kelmer (kelmer at gmail.com)
Date: 2026-05-22T16:23:28+02:00

Commit Message:
PELROCK: Initialize all variables for Description, Anim and PaletteAnims. PVS-Studio V730

Changed paths:
    engines/pelrock/types.h


diff --git a/engines/pelrock/types.h b/engines/pelrock/types.h
index b2832a3e06d..e5b6b797ee2 100644
--- a/engines/pelrock/types.h
+++ b/engines/pelrock/types.h
@@ -266,12 +266,12 @@ struct AlfredSpecialAnimOffset {
  * Each Anim has its own speed, loopCount and movement!
  */
 struct Anim {
-	int nframes;
+	int nframes = 0;
 	int curFrame = 0;
 	int curLoop = 0;
-	byte **animData;
-	byte loopCount;
-	byte speed;
+	byte **animData = nullptr;
+	byte loopCount = 0;
+	byte speed = 0;
 	byte elpapsedFrames = 0;
 	uint16 movementFlags = 0;
 };
@@ -358,10 +358,10 @@ struct TalkingAnims {
 };
 
 struct Description {
-	byte itemId;
-	byte index;
+	byte itemId = 0;
+	byte index = 0;
 	bool isAction = false;
-	uint16 actionTrigger;
+	uint16 actionTrigger = 0;
 	Common::String text;
 };
 
@@ -458,19 +458,19 @@ struct Sticker {
 };
 
 struct PaletteAnimRotate {
-	byte startIndex;
-	byte paletteMode;
-	byte unknown;
-	byte delay;
-	byte unknownBytes[7];
-	byte flags;
+	byte startIndex = 0;
+	byte paletteMode = 0;
+	byte unknown = 0;
+	byte delay = 0;
+	byte unknownBytes[7] = {0};
+	byte flags = 0;
 	byte curFrameCount = 0;
 };
 
 struct PaletteAnim {
-	byte startIndex;
-	byte paletteMode;
-	byte data[10]; // Based on mode its a rotate or fade
+	byte startIndex = 0;
+	byte paletteMode = 0;
+	byte data[10] = {0}; // Based on mode its a rotate or fade
 	byte curFrame = 0;
 	byte tickCount = 0;
 };
@@ -516,9 +516,9 @@ struct ChoiceOption {
 };
 
 struct ResetEntry {
-	uint16 room;
-	uint16 offset;
-	byte dataSize;
+	uint16 room = 0;
+	uint16 offset = 0;
+	byte dataSize = 0;
 	byte *data = nullptr;
 };
 




More information about the Scummvm-git-logs mailing list