File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -1230,19 +1230,15 @@ void CheckIO::checkFormatString(const Token * const tok,
12301230 // If the next character is the same (which makes 'hh' or 'll') then expect another alphabetical character
12311231 const bool isSecondCharAvailable = ((i + 1 ) != formatString.end ());
12321232 if (i != formatString.end () && isSecondCharAvailable && *(i + 1 ) == *i) {
1233- if (isSecondCharAvailable) {
1234- if (!isalpha (*(i + 2 ))) {
1235- std::string modifier;
1236- modifier += *i;
1237- modifier += *(i + 1 );
1238- invalidLengthModifierError (tok, numFormat, modifier);
1239- done = true ;
1240- } else {
1241- specifier = *i++;
1242- specifier += *i++;
1243- }
1244- } else {
1233+ if (!isalpha (*(i + 2 ))) {
1234+ std::string modifier;
1235+ modifier += *i;
1236+ modifier += *(i + 1 );
1237+ invalidLengthModifierError (tok, numFormat, modifier);
12451238 done = true ;
1239+ } else {
1240+ specifier = *i++;
1241+ specifier += *i++;
12461242 }
12471243 } else {
12481244 if (i != formatString.end ()) {
You can’t perform that action at this time.
0 commit comments