Skip to content

Commit 682823b

Browse files
committed
Add explicit double cast
Avoid precision warning.
1 parent 91d7e87 commit 682823b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mysqlnd/mysqlnd_ps_codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copie
636636
Check bug #52891 : Wrong data inserted with mysqli/mysqlnd when using bind_param, value > LONG_MAX
637637
We do transformation here, which will be used later when sending types. The code later relies on this.
638638
*/
639-
if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
639+
if (d >= (double) ZEND_LONG_MAX || d < (double) ZEND_LONG_MIN) {
640640
stmt->send_types_to_server = *resend_types_next_time = 1;
641641
convert_to_string_ex(tmp_data);
642642
} else {

0 commit comments

Comments
 (0)