diff options
author | Alyssa Milburn | 2012-08-28 10:08:37 +0200 |
---|---|---|
committer | Alyssa Milburn | 2012-08-28 10:09:13 +0200 |
commit | fbf771ea55b321e5f7914eb989d82bdd2a579f98 (patch) | |
tree | bfb7bbb22cd4e9bb8994069b22c0e16e0aba102c /engines | |
parent | e6bd426398c75fb6e268e58508b19307ab0c53eb (diff) | |
download | scummvm-rg350-fbf771ea55b321e5f7914eb989d82bdd2a579f98.tar.gz scummvm-rg350-fbf771ea55b321e5f7914eb989d82bdd2a579f98.tar.bz2 scummvm-rg350-fbf771ea55b321e5f7914eb989d82bdd2a579f98.zip |
TONY: Fix stringLen for empty strings.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tony/font.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp index 91dd8c0c39..41dfa1f7bf 100644 --- a/engines/tony/font.cpp +++ b/engines/tony/font.cpp @@ -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]); |