CheckIO: fix crash

This commit is contained in:
Robert Reif 2013-10-08 05:33:37 +02:00 committed by Daniel Marjamäki
parent 9271286425
commit 41b3ed788d
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ void CheckIO::checkWrongPrintfScanfArguments()
}
++i;
}
if (*i == '[') {
if (i != formatString.end() && *i == '[') {
while (i != formatString.end()) {
if (*i == ']') {
if (!skip) {