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

sev- noreply at scummvm.org
Sun Feb 8 18:29:13 UTC 2026


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

Summary:
ce7864a759 DIRECTOR: Properly set palette for BITD resources


Commit: ce7864a759ca26fbac59513cf269ef18bf97e698
    https://github.com/scummvm/scummvm/commit/ce7864a759ca26fbac59513cf269ef18bf97e698
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-02-08T19:28:45+01:00

Commit Message:
DIRECTOR: Properly set palette for BITD resources

We were setting 255 out of 256 colors, which could lead to

  libpng: Wrote palette index exceeding num_palette

Changed paths:
    engines/director/images.cpp


diff --git a/engines/director/images.cpp b/engines/director/images.cpp
index 735ad73b00f..398c19722fa 100644
--- a/engines/director/images.cpp
+++ b/engines/director/images.cpp
@@ -160,8 +160,8 @@ BITDDecoder::BITDDecoder(int w, int h, uint16 bitsPerPixel, uint16 pitch, const
 	_surface->create(w, h, format);
 
 	// TODO: Bring this in from the main surface?
-	_palette.resize(255, false);
-	_palette.set(palette, 0, 255);
+	_palette.resize(256, false);
+	_palette.set(palette, 0, 256);
 
 	_bitsPerPixel = bitsPerPixel;
 }




More information about the Scummvm-git-logs mailing list