From 8aeeacf204db92e14df1e7b12f66f8c292e6e3e0 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 13 Aug 2017 16:15:18 +0200 Subject: TITANIC: Add missing va_end() on early return (CppCheck warning) --- engines/titanic/support/simple_file.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/titanic/support') 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(); -- cgit v1.2.3