- Fixed Table::calculateColumnWidths bug.

This commit is contained in:
Paul Beckingham 2008-05-24 23:08:36 -04:00
parent ab0a57ec89
commit 45a25ca47b
7 changed files with 366 additions and 59 deletions

View file

@ -183,8 +183,16 @@ void extractLine (std::string& text, std::string& line, int length)
// If no space was found, hyphenate.
else
{
line = text.substr (0, length - 1) + "-";
text = text.substr (length - 1, std::string::npos);
if (length > 1)
{
line = text.substr (0, length - 1) + "-";
text = text.substr (length - 1, std::string::npos);
}
else
{
line = text.substr (0, 1);
text = text.substr (length, std::string::npos);
}
}
}