[Scummvm-git-logs] scummvm master -> e20d66ffeda81785937ad5275cd673edeaccbbd7

mduggan noreply at scummvm.org
Mon Jul 15 07:09:49 UTC 2024


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:
e20d66ffed DGDS: Fix small issues identified by Coverity


Commit: e20d66ffeda81785937ad5275cd673edeaccbbd7
    https://github.com/scummvm/scummvm/commit/e20d66ffeda81785937ad5275cd673edeaccbbd7
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-07-15T17:09:42+10:00

Commit Message:
DGDS: Fix small issues identified by Coverity

Changed paths:
    engines/dgds/console.cpp
    engines/dgds/detection.cpp
    engines/dgds/scene.cpp
    engines/dgds/scene.h


diff --git a/engines/dgds/console.cpp b/engines/dgds/console.cpp
index 8c73842a043..340f83f1294 100644
--- a/engines/dgds/console.cpp
+++ b/engines/dgds/console.cpp
@@ -393,7 +393,7 @@ bool Console::cmdScriptDump(int argc, const char **argv) {
 			break;
 		case 0x1500:
 			printOp(--indent, "ELSE / Skip to end-if");
-			break;	
+			break;
 		case 0x1510:
 			printOp(--indent, "END IF");
 			break;
@@ -466,6 +466,8 @@ bool Console::cmdScriptDump(int argc, const char **argv) {
 		debugPrintf("\n");
 	}
 
+	delete resStream;
+
 	return true;
 }
 
diff --git a/engines/dgds/detection.cpp b/engines/dgds/detection.cpp
index af3938059aa..e7e03993f93 100644
--- a/engines/dgds/detection.cpp
+++ b/engines/dgds/detection.cpp
@@ -23,7 +23,6 @@
 #include "engines/advancedDetector.h"
 
 static const PlainGameDescriptor dgdsGames[] = {
-	{"dgds", "Dynamix DGDS game"},
 	{"rise", "Rise of the Dragon"},
 	{"china", "Heart of China"},
 	{"beamish", "The Adventures of Willy Beamish"},
diff --git a/engines/dgds/scene.cpp b/engines/dgds/scene.cpp
index 5ea026e436a..941bddffef8 100644
--- a/engines/dgds/scene.cpp
+++ b/engines/dgds/scene.cpp
@@ -1087,7 +1087,7 @@ void SDSScene::freeDialogData(uint16 num) {
 	if (!num)
 		return;
 
-	for (uint i = 0; i < _dialogs.size(); i++) {
+	for (int i = 0; i < (int)_dialogs.size(); i++) {
 		if (_dialogs[i]._num == num) {
 			_dialogs.remove_at(i);
 			i--;
@@ -1177,7 +1177,7 @@ bool SDSScene::loadTalkData(uint16 num) {
 }
 
 void SDSScene::freeTalkData(uint16 num) {
-	for (uint i = 0; i < _talkData.size(); i++) {
+	for (int i = 0; i < (int)_talkData.size(); i++) {
 		if (_talkData[i]._num == num) {
 			_talkData.remove_at(i);
 			i--;
@@ -1270,8 +1270,8 @@ void SDSScene::updateHead(TalkDataHead &head) {
 }
 
 void SDSScene::drawVisibleHeads(Graphics::ManagedSurface *dst) {
-	for (auto tds : _talkData) {
-		for (auto h : tds._heads) {
+	for (const auto &tds : _talkData) {
+		for (const auto &h : tds._heads) {
 			if ((h._flags & kHeadFlagVisible) && !(h._flags & kHeadFlag40)) {
 				drawHead(dst, tds, h);
 			}
diff --git a/engines/dgds/scene.h b/engines/dgds/scene.h
index 8baa31cf47f..88923be1ea9 100644
--- a/engines/dgds/scene.h
+++ b/engines/dgds/scene.h
@@ -274,7 +274,7 @@ public:
 
 class TalkData {
 public:
-	TalkData() : _num(0) {}
+	TalkData() : _num(0), _val(0) {}
 	Common::String dump(const Common::String &indent) const;
 
 	uint16 _num;




More information about the Scummvm-git-logs mailing list