fixed strstr()

This commit is contained in:
Anatol Belski committed 2013-10-16 03:08:26 -07:00
1 parent c9280f1e1c
commit df0a28baab
1 file changed
+3 -3
+3 -3
View File
@@ -2999,9 +2999,9 @@ static PPRES *php_strtr_array_prepare(STR *text, PATNREPL *patterns, int patnum,
}
}
res->hash->entries[HASH_TAB_SIZE] = patnum; /* OK, we effectively allocated SIZE+1 */
for (i = HASH_TAB_SIZE - 1; i >= 0; i--) {
if (res->hash->entries[i] == -1) {
res->hash->entries[i] = res->hash->entries[i + 1];
for (i = HASH_TAB_SIZE; i > 0; i--) {
if (res->hash->entries[i-1] == -1) {
res->hash->entries[i-1] = res->hash->entries[i];
}
}