[Scummvm-git-logs] scummvm master -> eea0cfbbf147864b0ed18082b1fbff7df65d1a00
antoniou79
noreply at scummvm.org
Thu Dec 19 17:20:59 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:
eea0cfbbf1 BLADERUNNER: Initialize color in SliceRenderer::drawShadowPolygon()
Commit: eea0cfbbf147864b0ed18082b1fbff7df65d1a00
https://github.com/scummvm/scummvm/commit/eea0cfbbf147864b0ed18082b1fbff7df65d1a00
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-12-19T19:15:28+02:00
Commit Message:
BLADERUNNER: Initialize color in SliceRenderer::drawShadowPolygon()
Prevents compiler warning for potential uninitialized use of color
This would happen if getPixel() dealt with a Surface whose bytePerPixel would be a value other than 1, 2 or 4. So highly unlikely.
Changed paths:
engines/bladerunner/slice_renderer.cpp
diff --git a/engines/bladerunner/slice_renderer.cpp b/engines/bladerunner/slice_renderer.cpp
index 87331edde9f..19014a30c20 100644
--- a/engines/bladerunner/slice_renderer.cpp
+++ b/engines/bladerunner/slice_renderer.cpp
@@ -732,7 +732,7 @@ void SliceRenderer::drawShadowPolygon(int transparency, Graphics::Surface &surfa
if (z >= zMin) {
int index = (x & 3) + ((y & 3) << 2);
if (transparency - ditheringFactor[index] <= 0) {
- uint32 color;
+ uint32 color = 0;
uint8 r, g, b;
getPixel(surface, pixel, color);
surface.format.colorToRGB(color, r, g, b);
More information about the Scummvm-git-logs
mailing list