From 98ae4615561a318f6ce5d85ef13d84d3bf9d731f Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Sat, 18 Oct 2008 23:58:26 +0000 Subject: Fixed: Assert when parsing a corrupted Theme archive (now discarding the theme silently as non-valid). svn-id: r34825 --- gui/theme.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui/theme.cpp b/gui/theme.cpp index 1c8798e472..1387eb94ea 100644 --- a/gui/theme.cpp +++ b/gui/theme.cpp @@ -132,6 +132,9 @@ bool Theme::isThemeLoadingRequired() { bool Theme::themeConfigParseHeader(Common::String header, Common::String &themeName) { header.trim(); + if (header.empty()) + return false; + if (header[0] != '[' || header.lastChar() != ']') return false; -- cgit v1.2.3