summaryrefslogtreecommitdiff
path: root/ext/interbase
diff options
context:
space:
mode:
authorArd Biesheuvel <abies@php.net>2004-06-28 11:27:05 +0000
committerArd Biesheuvel <abies@php.net>2004-06-28 11:27:05 +0000
commit16e2d614350142bb960e786417ec70f633eebece (patch)
tree29d618ef82ab7b363ec41027738631c46489ed30 /ext/interbase
parent98672f41bae22c14abf3091002e2c7a7621c9694 (diff)
downloadphp-git-16e2d614350142bb960e786417ec70f633eebece.tar.gz
MFB Fixed bug #28897 (-1 returned as -0.000 for 64-bit scaled int)
Diffstat (limited to 'ext/interbase')
-rw-r--r--ext/interbase/ibase_query.c4
1 files changed, 2 insertions, 2 deletions
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);