Hash value must not zero?
authorXinchen Hui <laruence@php.net>
Sat, 13 Dec 2014 03:42:53 +0000 (11:42 +0800)
committerXinchen Hui <laruence@php.net>
Sat, 13 Dec 2014 03:42:53 +0000 (11:42 +0800)
Zend/zend_string.h

index 1da3b511c0b0f98fc7cd01137aec58d76e4b5d2b..9a4eb8329c073e650912d3cbc9f11a7545a7007a 100644 (file)
@@ -279,6 +279,8 @@ static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size
                case 0: break;
 EMPTY_SWITCH_DEFAULT_CASE()
        }
+
+       ZEND_ASSERT(hash != 0);
        return hash;
 }