[Scummvm-git-logs] scummvm master -> 633f673a9af281d244f491d5e493f5b25cea2920

bluegr bluegr at gmail.com
Thu Jul 30 13:41:56 UTC 2020


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:
633f673a9a AGI: Fix bug #11209 (wrong `horizon` value saved)


Commit: 633f673a9af281d244f491d5e493f5b25cea2920
    https://github.com/scummvm/scummvm/commit/633f673a9af281d244f491d5e493f5b25cea2920
Author: Zvika Haramaty (haramaty.zvika at gmail.com)
Date: 2020-07-30T16:41:51+03:00

Commit Message:
AGI: Fix bug #11209 (wrong `horizon` value saved)

`_game.horizon` is defined as uint16, but was casted to uint8 before saving
thus, caused problems for values bigger than 128 - they were interpreted
as negative values

Changed paths:
    engines/agi/saveload.cpp


diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 29dd41a506..1f23154106 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -147,7 +147,7 @@ int AgiEngine::saveGame(const Common::String &fileName, const Common::String &de
 	for (i = 0; i < MAX_VARS; i++)
 		out->writeByte(_game.vars[i]);
 
-	out->writeSint16BE((int8)_game.horizon);
+	out->writeSint16BE((int16)_game.horizon);
 	out->writeSint16BE((int16)_text->statusRow_Get());
 	out->writeSint16BE((int16)_text->promptRow_Get());
 	out->writeSint16BE((int16)_text->getWindowRowMin());




More information about the Scummvm-git-logs mailing list