diff --git a/format.cc b/format.cc index f757e4c9..a239bc82 100644 --- a/format.cc +++ b/format.cc @@ -655,9 +655,10 @@ void fmt::BasicWriter::PrintfParser::Format( int precision = -1; switch (have_width) { - case false: + case false: { // TODO: parse optional flags - for (bool stop = false; !stop;) { + bool stop = false; + do { switch (*s) { case '-': ++s; @@ -677,7 +678,7 @@ void fmt::BasicWriter::PrintfParser::Format( default: stop = true; } - } + } while (!stop); /* // Parse fill and alignment. @@ -740,6 +741,7 @@ void fmt::BasicWriter::PrintfParser::Format( if (*s < '0' || *s > '9') break; spec.width_ = internal::ParseNonnegativeInt(s, error); + } // Fall through. default: if (spec.fill_ == '0') {