Fixed overflow bug introduced by the warning fixes
This commit is contained in:
parent
2899e3f852
commit
ca1560d53d
1 changed files with 3 additions and 2 deletions
|
|
@ -368,8 +368,9 @@ void format_t::format(std::ostream& out_str, scope_t& scope)
|
|||
result = truncate(temp, elem->max_width);
|
||||
} else {
|
||||
result = temp.extract();
|
||||
for (std::size_t i = 0; i < elem->min_width - temp.length(); i++)
|
||||
result += " ";
|
||||
if (elem->min_width > temp.length())
|
||||
for (std::size_t i = 0; i < elem->min_width - temp.length(); i++)
|
||||
result += " ";
|
||||
}
|
||||
out_str << result;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue