mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
TONY: Fix stringLen for empty strings.
This commit is contained in:
parent
e6bd426398
commit
fbf771ea55
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user