[Scummvm-git-logs] scummvm master -> 5ed3dd8d818c013092fb2ac80daf68c3957e8eec
sev-
noreply at scummvm.org
Sat Jun 8 20:13:36 UTC 2024
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:
5ed3dd8d81 GUI: Print out more diagnostics when theme file is bad
Commit: 5ed3dd8d818c013092fb2ac80daf68c3957e8eec
https://github.com/scummvm/scummvm/commit/5ed3dd8d818c013092fb2ac80daf68c3957e8eec
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-06-08T22:13:26+02:00
Commit Message:
GUI: Print out more diagnostics when theme file is bad
Changed paths:
gui/ThemeEngine.cpp
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index ad133849fec..c4be030462d 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1861,19 +1861,27 @@ bool ThemeEngine::themeConfigParseHeader(Common::String header, Common::String &
header.trim();
- if (header.empty())
+ if (header.empty()) {
+ warning("Theme format is bad: empty header");
return false;
+ }
- if (header[0] != '[' || header.lastChar() != ']')
+ if (header[0] != '[' || header.lastChar() != ']') {
+ warning("Theme format is bad: missing square brackets");
return false;
+ }
header.deleteChar(0);
header.deleteLastChar();
Common::StringTokenizer tok(header, ":");
- if (tok.nextToken() != SCUMMVM_THEME_VERSION_STR)
+ Common::String version = tok.nextToken();
+
+ if (version != SCUMMVM_THEME_VERSION_STR) {
+ warning("Theme version mismatch. Expecting '%s' but got '%s'", SCUMMVM_THEME_VERSION_STR, version.c_str());
return false;
+ }
themeName = tok.nextToken();
Common::String author = tok.nextToken();
More information about the Scummvm-git-logs
mailing list