From 7ec661807032d22fb0891094bf25f18c68d478a4 Mon Sep 17 00:00:00 2001 From: Michael Hertsch Date: Fri, 18 Aug 2017 23:32:24 +0000 Subject: [PATCH] Fix: changed php_eos_datastructures_check_value to actually compare a long against value instead of a ptr which always failed --- src/enum.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/enum.c b/src/enum.c index 337a20e..9f0cd28 100644 --- a/src/enum.c +++ b/src/enum.c @@ -75,6 +75,10 @@ PHP_EOS_DATASTRUCTURES_API zend_bool php_eos_datastructures_check_value(zend_cla zend_bool return_value = 0; ZEND_HASH_FOREACH_VAL(&ce->constants_table, val) { + if (Z_TYPE_P(val) == IS_PTR) { + val = (zval *) Z_PTR_P(val); + } + if(Z_LVAL_P(val) == value) { return_value = 1; break;