}
zend_str_tolower(path, path_len);
- while (path_len >= 0) {
+ while (path_len > 0) {
HashTable *ht = (HashTable *)zend_hash_str_find_ptr(PW32G(registry_directories), path, path_len);
if (ht != NULL) {
} ZEND_HASH_FOREACH_END();
}
- if (--path_len > 0) {
- while (path_len > 0 && path[path_len] != '/') {
- path_len--;
- }
- }
+ do {
+ path_len--;
+ } while (path_len > 0 && path[path_len] != '/');
path[path_len] = 0;
}