[Scummvm-git-logs] scummvm master -> 9c9873b95e3f533285d14e54d426494620ac37e5

athrxx noreply at scummvm.org
Thu Jun 23 20:24:54 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:
9c9873b95e KYRA: fix uninitialized vars warning


Commit: 9c9873b95e3f533285d14e54d426494620ac37e5
    https://github.com/scummvm/scummvm/commit/9c9873b95e3f533285d14e54d426494620ac37e5
Author: athrxx (athrxx at scummvm.org)
Date: 2022-06-23T22:24:40+02:00

Commit Message:
KYRA: fix uninitialized vars warning

Changed paths:
    engines/kyra/text/text.cpp


diff --git a/engines/kyra/text/text.cpp b/engines/kyra/text/text.cpp
index 34b53315a80..28b62e211d3 100644
--- a/engines/kyra/text/text.cpp
+++ b/engines/kyra/text/text.cpp
@@ -259,7 +259,7 @@ void TextDisplayer::printText(const Common::String &str, int x, int y, uint8 c0,
 }
 
 void TextDisplayer::printCharacterText(const char *text, int8 charNum, int charX) {
-	int top, left, x1, x2, w, x;
+	int top, left, w, x;
 	char *msg;
 
 	text = preprocessString(text);
@@ -272,6 +272,8 @@ void TextDisplayer::printCharacterText(const char *text, int8 charNum, int charX
 		w = MIN<int>(w, 302);
 	}
 
+	int x1 = 12;
+	int x2 = Screen::SCREEN_W - 12;
 	if (_vm->gameFlags().lang != Common::ZH_TWN || lineCount == 1) {
 		x = charX;
 		calcWidestLineBounds(x1, x2, w, x);




More information about the Scummvm-git-logs mailing list