MFB Fixed bug #28897 (-1 returned as -0.000 for 64-bit scaled int)

This commit is contained in:
Ard Biesheuvel 2004-06-28 11:27:05 +00:00
parent 98672f41ba
commit 16e2d61435

View File

@ -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);