[Scummvm-git-logs] scummvm master -> 7b05beda52bb0064bea668e2f4a85671ddfc32b3

athrxx athrxx at scummvm.org
Fri Nov 5 00:59:17 UTC 2021


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:
7b05beda52 KYRA: avoid "adding '\0' to string" warning


Commit: 7b05beda52bb0064bea668e2f4a85671ddfc32b3
    https://github.com/scummvm/scummvm/commit/7b05beda52bb0064bea668e2f4a85671ddfc32b3
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-05T01:58:34+01:00

Commit Message:
KYRA: avoid "adding '\0' to string" warning

(happened in the save dialog, when pressing shift)

Changed paths:
    engines/kyra/engine/util.cpp


diff --git a/engines/kyra/engine/util.cpp b/engines/kyra/engine/util.cpp
index 7537e992c9..9b4670d54b 100644
--- a/engines/kyra/engine/util.cpp
+++ b/engines/kyra/engine/util.cpp
@@ -99,7 +99,8 @@ Common::String Util::convertISOToUTF8(Common::String &str) {
 }
 
 void Util::convertISOToDOS(char &c) {
-	c = Common::U32String(Common::String::format("%c", c), Common::kISO8859_1).encode(Common::kDos850).firstChar();
+	if (c)
+		c = Common::U32String(Common::String::format("%c", c), Common::kISO8859_1).encode(Common::kDos850).firstChar();
 }
 
 Common::String Util::decodeString1(const Common::String &src) {




More information about the Scummvm-git-logs mailing list