mirror of
https://github.com/php/php-src.git
synced 2024-12-01 13:54:10 +08:00
MFB Fixed bug #28897 (-1 returned as -0.000 for 64-bit scaled int)
This commit is contained in:
parent
98672f41ba
commit
16e2d61435
@ -1321,7 +1321,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
|
||||
|
||||
if (n >= 0) {
|
||||
l = sprintf(string_data, "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -scale, n % f);
|
||||
} else if (n < -f) {
|
||||
} else if (n <= -f) {
|
||||
l = sprintf(string_data, "%" LL_MASK "d.%0*" LL_MASK "d", n / f, -scale, -n % f);
|
||||
} else {
|
||||
l = sprintf(string_data, "-0.%0*" LL_MASK "d", -scale, -n % f);
|
||||
@ -1340,7 +1340,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
|
||||
|
||||
if (n >= 0) {
|
||||
l = sprintf(string_data, "%ld.%0*ld", n / f, -scale, n % f);
|
||||
} else if (n < -f) {
|
||||
} else if (n <= -f) {
|
||||
l = sprintf(string_data, "%ld.%0*ld", n / f, -scale, -n % f);
|
||||
} else {
|
||||
l = sprintf(string_data, "-0.%0*ld", -scale, -n % f);
|
||||
|
Loading…
Reference in New Issue
Block a user