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

bluegr noreply at scummvm.org
Thu Oct 27 01:21:30 UTC 2022


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:
d85f349e18 ILLUSIONS: Fix an off-by-one in ScreenPalette::updateFaderPalette()


Commit: d85f349e18030c72856a8ec356207323d43fd963
    https://github.com/scummvm/scummvm/commit/d85f349e18030c72856a8ec356207323d43fd963
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-10-27T04:21:26+03:00

Commit Message:
ILLUSIONS: Fix an off-by-one in ScreenPalette::updateFaderPalette()

Changed paths:
    engines/illusions/screen.cpp


diff --git a/engines/illusions/screen.cpp b/engines/illusions/screen.cpp
index 5edbe0ccbee..d47ef9c5f61 100644
--- a/engines/illusions/screen.cpp
+++ b/engines/illusions/screen.cpp
@@ -301,7 +301,7 @@ void ScreenPalette::updatePalette() {
 void ScreenPalette::updateFaderPalette() {
 	if (_newFaderValue >= 255) {
 		_newFaderValue -= 256;
-		for (int i = _firstFaderIndex; i <= _lastFaderIndex; ++i) {
+		for (int i = _firstFaderIndex; i < _lastFaderIndex; ++i) {
 			byte r = _mainPalette[i * 3 + 0];
 			byte g = _mainPalette[i * 3 + 1];
 			byte b = _mainPalette[i * 3 + 2];
@@ -310,7 +310,7 @@ void ScreenPalette::updateFaderPalette() {
 			_faderPalette[i * 3 + 2] = b - (((_newFaderValue * (255 - b)) >> 8) & 0xFF);
 		}
 	} else {
-		for (int i = _firstFaderIndex; i <= _lastFaderIndex; ++i) {
+		for (int i = _firstFaderIndex; i < _lastFaderIndex; ++i) {
 			byte r = _mainPalette[i * 3 + 0];
 			byte g = _mainPalette[i * 3 + 1];
 			byte b = _mainPalette[i * 3 + 2];




More information about the Scummvm-git-logs mailing list