aboutsummaryrefslogtreecommitdiff
path: root/common/str.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/str.cpp')
-rw-r--r--common/str.cpp3
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) {