]> granicus.if.org Git - php/commitdiff
MFB Fixed bug #28897 (-1 returned as -0.000 for 64-bit scaled int)
authorArd Biesheuvel <abies@php.net>
Mon, 28 Jun 2004 11:27:05 +0000 (11:27 +0000)
committerArd Biesheuvel <abies@php.net>
Mon, 28 Jun 2004 11:27:05 +0000 (11:27 +0000)
ext/interbase/ibase_query.c

index 09bbb1313c6134bdc4857fcc0888748f97169ce9..c95973c7e5e38ce6431dce0ea2168eca316b380b 100644 (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);