mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 18:35:42 +00:00
fixed strstr()
This commit is contained in:
1 parent
c9280f1e1c
commit
df0a28baab
1 file changed
+3
-3
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user