aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeParser.cpp10
-rw-r--r--gui/predictivedialog.cpp5
-rw-r--r--gui/themes/translations.datbin417353 -> 438002 bytes
3 files changed, 11 insertions, 4 deletions
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 8285aff7ca..bd5b406ca8 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -335,11 +335,15 @@ bool ThemeParser::parserCallback_drawstep(ParserNode *node) {
drawstep->drawingCall = getDrawingFunctionCallback(functionName);
- if (drawstep->drawingCall == 0)
+ if (drawstep->drawingCall == 0) {
+ delete drawstep;
return parserError(functionName + " is not a valid drawing function name");
+ }
- if (!parseDrawStep(node, drawstep, true))
+ if (!parseDrawStep(node, drawstep, true)) {
+ delete drawstep;
return false;
+ }
_theme->addDrawStep(getParentNode(node)->values["id"], *drawstep);
delete drawstep;
@@ -691,7 +695,7 @@ bool ThemeParser::parserCallback_layout(ParserNode *node) {
return false;
}
- Common::parseBool(node->values["center"], center);
+ (void)Common::parseBool(node->values["center"], center);
if (node->values["type"] == "vertical")
_theme->getEvaluator()->addLayout(GUI::ThemeLayout::kLayoutVertical, spacing, center);
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index ed18847a40..5ce093e054 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -779,7 +779,7 @@ bool PredictiveDialog::searchWord(const char *const where, const Common::String
}
void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Common::String &code) {
- char *newLine;
+ char *newLine = 0;
Common::String tmpCode = code + ' ';
int line = binarySearch(dict.dictLine, tmpCode, dict.dictLineCount);
if (line >= 0) {
@@ -856,6 +856,9 @@ void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Com
char **newDictLine = (char **)calloc(1, sizeof(char *) * (dict.dictLineCount + 1));
if (!newDictLine) {
warning("Predictive Dialog: cannot allocate memory for index buffer");
+
+ free(newLine);
+
return;
}
newDictLine[dict.dictLineCount] = '\0';
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index 3dc7ef7e2d..b50f79d77f 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ