Skip to content

Commit

Permalink
TONY: Fix stringLen for empty strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzie committed Aug 28, 2012
1 parent e6bd426 commit fbf771e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engines/tony/font.cpp
Expand Up @@ -122,6 +122,9 @@ void RMFont::close() {
int RMFont::stringLen(const Common::String &text) {
uint len, i;

if (text.empty())
return letterLength('\0');

len = 0;
for (i = 0; i < text.size() - 1; i++)
len += letterLength(text[i], text[i + 1]);
Expand Down

0 comments on commit fbf771e

Please sign in to comment.