Fixed overflow bug introduced by the warning fixes

This commit is contained in:
John Wiegley 2009-10-25 05:39:47 -04:00
parent 2899e3f852
commit ca1560d53d

View file

@ -368,6 +368,7 @@ void format_t::format(std::ostream& out_str, scope_t& scope)
result = truncate(temp, elem->max_width); result = truncate(temp, elem->max_width);
} else { } else {
result = temp.extract(); result = temp.extract();
if (elem->min_width > temp.length())
for (std::size_t i = 0; i < elem->min_width - temp.length(); i++) for (std::size_t i = 0; i < elem->min_width - temp.length(); i++)
result += " "; result += " ";
} }