From: Ard Biesheuvel Date: Mon, 28 Jun 2004 11:27:05 +0000 (+0000) Subject: MFB Fixed bug #28897 (-1 returned as -0.000 for 64-bit scaled int) X-Git-Tag: php-5.0.0~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16e2d614350142bb960e786417ec70f633eebece;p=php MFB Fixed bug #28897 (-1 returned as -0.000 for 64-bit scaled int) --- diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c index 09bbb1313c..c95973c7e5 100644 --- a/ext/interbase/ibase_query.c +++ b/ext/interbase/ibase_query.c @@ -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);