aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2017-08-13 16:15:18 +0200
committerTorbjörn Andersson2017-08-13 16:15:18 +0200
commit8aeeacf204db92e14df1e7b12f66f8c292e6e3e0 (patch)
tree230cf5499d0079ef2bb7c91530da185389e13a1d
parentf738e79e2a5dff5feed81834ca84e47aa8dac114 (diff)
downloadscummvm-rg350-8aeeacf204db92e14df1e7b12f66f8c292e6e3e0.tar.gz
scummvm-rg350-8aeeacf204db92e14df1e7b12f66f8c292e6e3e0.tar.bz2
scummvm-rg350-8aeeacf204db92e14df1e7b12f66f8c292e6e3e0.zip
TITANIC: Add missing va_end() on early return (CppCheck warning)
-rw-r--r--engines/titanic/support/simple_file.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/titanic/support/simple_file.cpp b/engines/titanic/support/simple_file.cpp
index 65d2c85273..103f062ac6 100644
--- a/engines/titanic/support/simple_file.cpp
+++ b/engines/titanic/support/simple_file.cpp
@@ -424,8 +424,10 @@ bool SimpleFile::scanf(const char *format, ...) {
formatStr.deleteChar(0);
safeRead(&c, 1);
- if (!Common::isSpace(c))
+ if (!Common::isSpace(c)) {
+ va_end(va);
return false;
+ }
// Skip over whitespaces
skipSpaces();