aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/basetypes
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-03-18 08:02:09 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-03-18 08:02:33 -0700
commit460372540a61034e2e5d0b255a0ac0ed5ee3e81f (patch)
tree5aacda37a4ae34e31d7177f33a85fa75f8821948 /src/core/basetypes
parent7e6ea9fcc94b36495e1e5e7bcab5e50c7d9a272f (diff)
Added assert
Diffstat (limited to 'src/core/basetypes')
-rw-r--r--src/core/basetypes/MCString.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/basetypes/MCString.cpp b/src/core/basetypes/MCString.cpp
index 46aebd44..e1c35a9c 100644
--- a/src/core/basetypes/MCString.cpp
+++ b/src/core/basetypes/MCString.cpp
@@ -2392,6 +2392,7 @@ Array * String::componentsSeparatedByString(String * separator)
p = location + separator->length();
}
unsigned int length = (unsigned int) (mLength - (p - mUnicodeChars));
+ MCAssert(length < mLength);
String * value = new String(p, length);
result->addObject(value);
value->release();