aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-04-19 08:08:04 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-04-19 08:08:04 -0700
commit983184224ddef74a1b95538abb971f073379c535 (patch)
tree51d5af9ac1314e1d30f3cf3658288238276ab9dc
parentdc9eec29eb121d3d37c42c0c8947e53998a16dba (diff)
Fixed crasher
-rw-r--r--src/core/basetypes/MCString.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/basetypes/MCString.cpp b/src/core/basetypes/MCString.cpp
index 98e27f64..7581343e 100644
--- a/src/core/basetypes/MCString.cpp
+++ b/src/core/basetypes/MCString.cpp
@@ -2370,9 +2370,9 @@ Array * String::componentsSeparatedByString(String * separator)
break;
}
#else
- int remaining = length() - (int) (p - mUnicodeChars);
location = NULL;
while (location == NULL) {
+ int remaining = length() - (int) (p - mUnicodeChars);
location = (UChar *) memmem(p, remaining * sizeof(UChar), separator->unicodeCharacters(), separator->length() * sizeof(UChar));
if (location == NULL) {
break;