Skip to content

Commit

Permalink
Add explicit double cast
Browse files Browse the repository at this point in the history
Avoid precision warning.
  • Loading branch information
nikic committed Sep 1, 2020
1 parent 91d7e87 commit 682823b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/mysqlnd/mysqlnd_ps_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copie
Check bug #52891 : Wrong data inserted with mysqli/mysqlnd when using bind_param, value > LONG_MAX
We do transformation here, which will be used later when sending types. The code later relies on this.
*/
if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
if (d >= (double) ZEND_LONG_MAX || d < (double) ZEND_LONG_MIN) {
stmt->send_types_to_server = *resend_types_next_time = 1;
convert_to_string_ex(tmp_data);
} else {
Expand Down

0 comments on commit 682823b

Please sign in to comment.