Skip to content

Commit

Permalink
TITANIC: Add missing va_end() on early return (CppCheck warning)
Browse files Browse the repository at this point in the history
  • Loading branch information
Torbjörn Andersson committed Aug 13, 2017
1 parent f738e79 commit 8aeeacf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engines/titanic/support/simple_file.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 8aeeacf

Please sign in to comment.