Fix typo in string search

This commit is contained in:
Nikolay Igotti
2017-03-23 17:04:18 +03:00
parent 78d2186f97
commit afcce921f2
+1 -1
View File
@@ -404,7 +404,7 @@ KInt Kotlin_String_indexOfString(KString thiz, KString other, KInt fromIndex) {
}
KInt count = thiz->count_;
const KChar* thizRaw = CharArrayAddressOfElementAt(thiz, fromIndex);
const KChar* otherRaw = CharArrayAddressOfElementAt(thiz, 0);
const KChar* otherRaw = CharArrayAddressOfElementAt(other, 0);
void* result = memmem(thizRaw, (thiz->count_ - fromIndex) * sizeof(KChar),
otherRaw, other->count_ * sizeof(KChar));
if (result == nullptr) return -1;