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

somaen noreply at scummvm.org
Fri May 12 08:11:34 UTC 2023


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

Summary:
f9dd430566 WATCHMAKER: Remove surplus _compression field in DDSTextureData (PVS)
ba21401dd7 WATCHMAKER: Avoid going OOB in LoadedFiles (PVS)


Commit: f9dd4305663ba3f802244c9603c3a0fa3ddd079d
    https://github.com/scummvm/scummvm/commit/f9dd4305663ba3f802244c9603c3a0fa3ddd079d
Author: Einar Johan Trøan Sømåen (somaen at scummvm.org)
Date: 2023-05-12T09:55:51+02:00

Commit Message:
WATCHMAKER: Remove surplus _compression field in DDSTextureData (PVS)

Changed paths:
    engines/watchmaker/3d/dds_header.cpp


diff --git a/engines/watchmaker/3d/dds_header.cpp b/engines/watchmaker/3d/dds_header.cpp
index 1598e3e7e24..80854f057fb 100644
--- a/engines/watchmaker/3d/dds_header.cpp
+++ b/engines/watchmaker/3d/dds_header.cpp
@@ -76,7 +76,6 @@ public:
 	~DDSTextureData() override {
 		delete[] _data;
 	}
-	DxtCompression _compression;
 	int getWidth() const override {
 		return _header.width;
 	}


Commit: ba21401dd7a22f957f2da66702f6e81820a556e2
    https://github.com/scummvm/scummvm/commit/ba21401dd7a22f957f2da66702f6e81820a556e2
Author: Einar Johan Trøan Sømåen (somaen at scummvm.org)
Date: 2023-05-12T09:55:51+02:00

Commit Message:
WATCHMAKER: Avoid going OOB in LoadedFiles (PVS)

Changed paths:
    engines/watchmaker/3d/loader.cpp


diff --git a/engines/watchmaker/3d/loader.cpp b/engines/watchmaker/3d/loader.cpp
index 3696470d04e..c67126f417d 100644
--- a/engines/watchmaker/3d/loader.cpp
+++ b/engines/watchmaker/3d/loader.cpp
@@ -337,9 +337,10 @@ t3dBODY* RoomManagerImplementation::loadSingleRoom(const Common::String &_pname,
 
 	{
 		uint16 j = 1;
-		while (LoadedFiles[j].b != nullptr)
+		while (j < MAX_LOADED_FILES && LoadedFiles[j].b != nullptr) {
 			j++;
-		if (j > MAX_LOADED_FILES) {
+		}
+		if (j >= MAX_LOADED_FILES) {
 			warning("Too many t3d files loaded!");
 			delete b;
 			return nullptr;




More information about the Scummvm-git-logs mailing list