diff options
author | Max Horn | 2008-10-02 17:17:18 +0000 |
---|---|---|
committer | Max Horn | 2008-10-02 17:17:18 +0000 |
commit | 0aa9e6ff4cbbc5a6b56232a7b369f3aa36cce82e (patch) | |
tree | c19b0f7dd78c62b1f13fa4d92fee21726abd203f | |
parent | 36b9fb30532277dd35e601d85509620d2206c87b (diff) | |
download | scummvm-rg350-0aa9e6ff4cbbc5a6b56232a7b369f3aa36cce82e.tar.gz scummvm-rg350-0aa9e6ff4cbbc5a6b56232a7b369f3aa36cce82e.tar.bz2 scummvm-rg350-0aa9e6ff4cbbc5a6b56232a7b369f3aa36cce82e.zip |
Ignore String::deleteLastChar when called on an empty string
svn-id: r34718
-rw-r--r-- | common/str.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/str.cpp b/common/str.cpp index 6c48738533..303ed7bfac 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -339,7 +339,8 @@ bool String::matchString(const String &pat) const { } void String::deleteLastChar() { - deleteChar(_size - 1); + if (_size > 0) + deleteChar(_size - 1); } void String::deleteChar(uint32 p) { |