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

index 4ff550c351314b05a17a7101d4dad2a8f12c977e..e51f37ce9fe29682cbc97acbe982f6661808405f 100644 (file)
@@ -1856,7 +1856,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, int sca
                                if (n >= 0) {
                                        Z_STRLEN_P(val) = sprintf (string_data, 
                                                "%" ISC_INT64_FORMAT "d.%0*" ISC_INT64_FORMAT "d", n / f, -scale, n % f);
-                               } else if (n < -f) {
+                               } else if (n <= -f) {
                                        Z_STRLEN_P(val) = sprintf (string_data,
                                                "%" ISC_INT64_FORMAT "d.%0*" ISC_INT64_FORMAT "d", n / f, -scale, -n % f);
                                } else {