From: Anatol Belski Date: Tue, 28 Oct 2014 15:52:49 +0000 (+0100) Subject: fix error code upcast on x64 X-Git-Tag: PRE_PHP7_REMOVALS~87^2~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2951a191ef1afea777b865b9c80ac939b603f6b;p=php fix error code upcast on x64 --- diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c index 084a720ea1..f0b21ff014 100644 --- a/ext/com_dotnet/com_misc.c +++ b/ext/com_dotnet/com_misc.c @@ -36,7 +36,11 @@ void php_com_throw_exception(HRESULT code, char *message TSRMLS_DC) message = php_win32_error_to_msg(code); free_msg = 1; } +#if SIZEOF_ZEND_LONG == 8 + zend_throw_exception(php_com_exception_class_entry, message, (zend_long)(uint32_t)code TSRMLS_CC); +#else zend_throw_exception(php_com_exception_class_entry, message, (zend_long)code TSRMLS_CC); +#endif if (free_msg) { LocalFree(message); }