TITANIC: Add missing va_end() on early return (CppCheck warning)

This commit is contained in:
Torbjörn Andersson 2017-08-13 16:15:18 +02:00
parent f738e79e2a
commit 8aeeacf204

View File

@ -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();