Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 1ad5004532127b8b3e795d6fd68182ad397ba9ea..713ddc8d313550c0a4e25805aa9f72bd83875bed 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -2446,9 +2446,10 @@ static int SimpleIndexOf(Vector<const schar> subject, |
pchar pattern_first_char = pattern[0]; |
for (int i = idx, n = subject.length() - pattern.length(); i <= n; i++) { |
if (sizeof(schar) == 1 && sizeof(pchar) == 1) { |
- schar* pos = reinterpret_cast<schar*>(memchr(subject.start() + i, |
- pattern_first_char, |
- n - i + 1)); |
+ const schar* pos = reinterpret_cast<const schar*>( |
+ memchr(subject.start() + i, |
+ pattern_first_char, |
+ n - i + 1)); |
if (pos == NULL) return -1; |
i = pos - subject.start(); |
} else { |