[Scummvm-git-logs] scummvm master -> 632c5b74fe3ef9387c47ea96894dd98553f0235a

eriktorbjorn noreply at scummvm.org
Sat Jan 4 10:59:54 UTC 2025


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:
632c5b74fe GRAPHICS: Fix undefined behavior when initializing Octree


Commit: 632c5b74fe3ef9387c47ea96894dd98553f0235a
    https://github.com/scummvm/scummvm/commit/632c5b74fe3ef9387c47ea96894dd98553f0235a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2025-01-04T11:59:15+01:00

Commit Message:
GRAPHICS: Fix undefined behavior when initializing Octree

As noted by Digitall on Discord.

Changed paths:
    graphics/color_quantizer.cpp


diff --git a/graphics/color_quantizer.cpp b/graphics/color_quantizer.cpp
index c250e0d0b38..649c40ec93f 100644
--- a/graphics/color_quantizer.cpp
+++ b/graphics/color_quantizer.cpp
@@ -222,7 +222,7 @@ private:
 
 public:
 	Octree(int maxLeaves) : _maxLeaves(maxLeaves) {
-		for (uint i = 0; i < kOctreeDepth; i++)
+		for (uint i = 0; i < kOctreeDepth - 1; i++)
 			_reduceList[i] = nullptr;
 	}
 




More information about the Scummvm-git-logs mailing list