[Scummvm-git-logs] scummvm master -> 1eefcb917cba5f0f20bb3ccef7fc647ea047507e

Marisa-Chan noreply at scummvm.org
Mon Jun 15 09:12:17 UTC 2026


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

Summary:
871d178d9f Init vm field before use it. PVS-Studio V670
a897f219bb Explicit init MoviePlayer and _txtInputBuffer field. PVS-Studio V730
87c82be991 Fix wrong assignment. PVS-Studio V519
fd480f5a49 Do not assign frame field twice. PVS-Studio V519
60e67e4af7 Explicit init fields. PVS-Studio V730
466c427f06 Fix lost exit. PVS-Studio V519
1eefcb917c sscanf string with buffer size. PVS-Studio V576


Commit: 871d178d9fd807b3ace7649d0ca21f768903e254
    https://github.com/scummvm/scummvm/commit/871d178d9fd807b3ace7649d0ca21f768903e254
Author: Marisa-Chan (thunder_8888 at mail.ru)
Date: 2026-06-15T16:11:30+07:00

Commit Message:
Init vm field before use it. PVS-Studio V670

Changed paths:
    engines/gamos/gamos.cpp
    engines/gamos/gamos.h


diff --git a/engines/gamos/gamos.cpp b/engines/gamos/gamos.cpp
index eec83f79876..210ea5e62e5 100644
--- a/engines/gamos/gamos.cpp
+++ b/engines/gamos/gamos.cpp
@@ -44,8 +44,8 @@ namespace Gamos {
 
 GamosEngine::GamosEngine(OSystem *syst, const GamosGameDescription *gameDesc) : Engine(syst),
 	_gameDescription(gameDesc),
-	_messageProc(this),
 	_vm(this, callbackVMCallDispatcher),
+	_messageProc(this),
 	_txtInputVMAccess(_vm),
 	_randomSource("gamos") {
 	for(uint i = 0; i < 256; i++)
diff --git a/engines/gamos/gamos.h b/engines/gamos/gamos.h
index 39a172c4e31..496bd111912 100644
--- a/engines/gamos/gamos.h
+++ b/engines/gamos/gamos.h
@@ -383,6 +383,8 @@ private:
 	Common::String _errMessage;
 
 	GameFile _gameFile;
+	
+	VM _vm;
 
 	byte _cmdByte = 0;
 
@@ -594,8 +596,6 @@ private:
 
 	Common::Array<Common::Rect> _dirtyRects;
 
-	VM _vm;
-
 	bool _needReload = false;
 
 	uint32 _engineVersion = 0x18;


Commit: a897f219bb89d040362e4c0f0708b93359ff40de
    https://github.com/scummvm/scummvm/commit/a897f219bb89d040362e4c0f0708b93359ff40de
Author: Marisa-Chan (thunder_8888 at mail.ru)
Date: 2026-06-15T16:11:30+07:00

Commit Message:
Explicit init MoviePlayer and _txtInputBuffer field. PVS-Studio V730

Changed paths:
    engines/gamos/gamos.cpp
    engines/gamos/movie.h


diff --git a/engines/gamos/gamos.cpp b/engines/gamos/gamos.cpp
index 210ea5e62e5..d70a8f17c72 100644
--- a/engines/gamos/gamos.cpp
+++ b/engines/gamos/gamos.cpp
@@ -50,6 +50,7 @@ GamosEngine::GamosEngine(OSystem *syst, const GamosGameDescription *gameDesc) :
 	_randomSource("gamos") {
 	for(uint i = 0; i < 256; i++)
 		_txtInputObjects[i] = nullptr;
+	memset(_txtInputBuffer, 0, sizeof(_txtInputBuffer));
 }
 
 GamosEngine::~GamosEngine() {
diff --git a/engines/gamos/movie.h b/engines/gamos/movie.h
index 80d26094856..7c397933f38 100644
--- a/engines/gamos/movie.h
+++ b/engines/gamos/movie.h
@@ -32,6 +32,10 @@ class GamosEngine;
 class MoviePlayer {
 public:
 
+	MoviePlayer() {
+		memset(_hdrBytes, 0, sizeof(_hdrBytes));
+	};
+
 	bool playMovie(Common::File *file, uint32 offset, GamosEngine *gamos);
 
 


Commit: 87c82be991763fb1be1e70577fdbdfa46a23518c
    https://github.com/scummvm/scummvm/commit/87c82be991763fb1be1e70577fdbdfa46a23518c
Author: Marisa-Chan (thunder_8888 at mail.ru)
Date: 2026-06-15T16:11:30+07:00

Commit Message:
Fix wrong assignment. PVS-Studio V519

Changed paths:
    engines/gamos/gamos.cpp


diff --git a/engines/gamos/gamos.cpp b/engines/gamos/gamos.cpp
index d70a8f17c72..f570432054b 100644
--- a/engines/gamos/gamos.cpp
+++ b/engines/gamos/gamos.cpp
@@ -1292,7 +1292,7 @@ uint8 GamosEngine::update(Common::Point screenSize, Common::Point mouseMove, Com
 	if (_enableInput == 0) {
 		act1 = ACT_NONE;
 		act2 = ACT_NONE;
-		_pressedKeyCode = ACT_NONE;
+		keyCode = ACT_NONE;
 	}
 
 	_pressedKeyCode = keyCode;


Commit: fd480f5a4922e6cef17d482ea9cf85eada813a8f
    https://github.com/scummvm/scummvm/commit/fd480f5a4922e6cef17d482ea9cf85eada813a8f
Author: Marisa-Chan (thunder_8888 at mail.ru)
Date: 2026-06-15T16:11:31+07:00

Commit Message:
Do not assign frame field twice. PVS-Studio V519

Changed paths:
    engines/gamos/gamos.cpp


diff --git a/engines/gamos/gamos.cpp b/engines/gamos/gamos.cpp
index f570432054b..58e99764b8c 100644
--- a/engines/gamos/gamos.cpp
+++ b/engines/gamos/gamos.cpp
@@ -3467,7 +3467,7 @@ void GamosEngine::addSubtitles(VM::Context *ctx, byte memtype, int32 offset, int
 Object *GamosEngine::addSubtitleImage(uint32 frame, int32 spr, int32 *pX, int32 y) {
 	Object *gfxObj = getFreeObject();
 	gfxObj->flags |= Object::FLAG_GRAPHIC | Object::FLAG_OVERLAY | Object::FLAG_FREECOORDS;
-	gfxObj->frame = 0;
+	//gfxObj->frame = 0;
 	gfxObj->frameMax = 1;
 	gfxObj->priority = _curObject->priority;
 	gfxObj->cell.x = -1;


Commit: 60e67e4af7f9d1ee2a4fe7c9155d001373aa61f0
    https://github.com/scummvm/scummvm/commit/60e67e4af7f9d1ee2a4fe7c9155d001373aa61f0
Author: Marisa-Chan (thunder_8888 at mail.ru)
Date: 2026-06-15T16:11:31+07:00

Commit Message:
Explicit init fields. PVS-Studio V730

Changed paths:
    engines/gamos/gamos.h
    engines/gamos/proc.h
    engines/gamos/vm.h


diff --git a/engines/gamos/gamos.h b/engines/gamos/gamos.h
index 496bd111912..10509890a71 100644
--- a/engines/gamos/gamos.h
+++ b/engines/gamos/gamos.h
@@ -144,13 +144,13 @@ typedef Common::Array<ImagePos> ImageSeq;
 struct Sprite {
 	uint32 index = 0;
 
-	byte field_0;
+	byte field_0 = 0;
 	union {
 		byte flags;
 		byte startChar; // if it's font
 	};
-	byte lastChar;
-	byte frameCount;
+	byte lastChar = 0;
+	byte frameCount = 0;
 
 	Common::Array<ImageSeq *> sequences;
 };
diff --git a/engines/gamos/proc.h b/engines/gamos/proc.h
index 36ff71e6f7f..a3071370d12 100644
--- a/engines/gamos/proc.h
+++ b/engines/gamos/proc.h
@@ -38,7 +38,9 @@ enum ACT2 {
 
 class SystemProc {
 public:
-	SystemProc(KeyCodes *conv) : _codesConverter(conv) {};
+	SystemProc(KeyCodes *conv) : _codesConverter(conv) {
+		memset(_keyCodes, 0, sizeof(_keyCodes));
+	};
 
 	void processMessage(const Common::Event &ev);
 
diff --git a/engines/gamos/vm.h b/engines/gamos/vm.h
index 58afae1ef2c..dcafce1d38b 100644
--- a/engines/gamos/vm.h
+++ b/engines/gamos/vm.h
@@ -152,7 +152,9 @@ public:
 
     class Context {
     public:
-        Context(VM &vm): _vm(vm), _readAccess(vm), _writeAccess(vm) {};
+        Context(VM &vm): _vm(vm), _readAccess(vm), _writeAccess(vm) {
+			memset(_stack, 0, sizeof(_stack));
+		};
 
         Common::String getString(int memtype, uint32 offset, uint32 maxLen = 256);
         Common::String getString(const ValAddr &addr, uint32 maxLen = 256);


Commit: 466c427f06fee5716547975d54bec4c9d9478ba5
    https://github.com/scummvm/scummvm/commit/466c427f06fee5716547975d54bec4c9d9478ba5
Author: Marisa-Chan (thunder_8888 at mail.ru)
Date: 2026-06-15T16:11:31+07:00

Commit Message:
Fix lost exit. PVS-Studio V519

Changed paths:
    engines/gamos/movie.cpp


diff --git a/engines/gamos/movie.cpp b/engines/gamos/movie.cpp
index 0ba6b53bee6..d1413ea9cb1 100644
--- a/engines/gamos/movie.cpp
+++ b/engines/gamos/movie.cpp
@@ -318,8 +318,13 @@ int MoviePlayer::processImageChunk() {
 		if (dtime > _frameTime) {
 			if (_soundBufferSize) {
 				_skippedFrames++;
-				if (_skippedFrames != 8)
+				if (_skippedFrames != 8) {
 					_doUpdateScreen = false;
+					_screen->update();
+					_currentFrame++;
+
+					return 1;
+				}
 			}
 		} else if (dtime < _frameTime) {
 			while (true) {


Commit: 1eefcb917cba5f0f20bb3ccef7fc647ea047507e
    https://github.com/scummvm/scummvm/commit/1eefcb917cba5f0f20bb3ccef7fc647ea047507e
Author: Marisa-Chan (thunder_8888 at mail.ru)
Date: 2026-06-15T16:11:31+07:00

Commit Message:
sscanf string with buffer size. PVS-Studio V576

Changed paths:
    engines/gamos/gamos.cpp


diff --git a/engines/gamos/gamos.cpp b/engines/gamos/gamos.cpp
index 58e99764b8c..e4e9ab8070b 100644
--- a/engines/gamos/gamos.cpp
+++ b/engines/gamos/gamos.cpp
@@ -2971,7 +2971,7 @@ void GamosEngine::vmCallDispatcher(VM::Context *ctx, uint32 funcID) {
 
 		char buffer[256];
 		int a = 0, b = 0, c = 0, d = 0;
-		if (sscanf(str.c_str(), "%s %d %d %d %d", buffer, &a, &b, &c, &d) > 0) {
+		if (sscanf(str.c_str(), "%255s %d %d %d %d", buffer, &a, &b, &c, &d) > 0) {
 			stopMidi();
 			stopSounds();
 




More information about the Scummvm-git-logs mailing list