ID:               15151
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           No Feedback
+Status:           Closed
 Bug Type:         InterBase related
 Operating System: Windows
 PHP Version:      4.1.1


Previous Comments:
------------------------------------------------------------------------

[2002-04-29 00:00:03] [EMAIL PROTECTED]

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2002-03-28 06:05:26] [EMAIL PROTECTED]

I think it must be already fixed in CVS.
Have a look at it and if you can try it on Win32.

Daniela

------------------------------------------------------------------------

[2002-03-27 12:17:45] [EMAIL PROTECTED]

please make a patch against the current CVS version.

Derick

------------------------------------------------------------------------

[2002-03-27 11:08:06] [EMAIL PROTECTED]

The original fix I posted has its own bug (due to me not VC++) when the
number is less than 0 but greater than -1 the negative sign does not
appear.  This fixes it (and the original problem also):
Add these declarations:
 ISC_INT64      tv64;
 ISC_INT64      iv64;
 ISC_INT64      fv64;

then change the code:

case SQL_INT64:
 tv64 = (ISC_INT64) *((ISC_INT64 *) data);
 iv64 = (tv64 / (int) pow(10.0, (double) -scale));
 fv64 = (ISC_INT64) abs((int) tv64
       % (int) pow(10.0, (double) -scale));
 val->type = IS_STRING;
 if ( tv64 < 0  &&  iv64 == 0 ) 
  val->value.str.len = sprintf(string_data, "-0");
 else
  val->value.str.len = sprintf(string_data, "%Ld", iv64);
 val->value.str.len += sprintf(string_data +
           val->value.str.len, ".%0*Ld", -scale, fv64);
 val->value.str.val = estrdup(string_data);
 break;

------------------------------------------------------------------------

[2002-03-27 11:06:10] [EMAIL PROTECTED]

The original fix I posted has its own bug (due to me not VC++) when the
number is less than 0 but greater than -1 the negative sign does not
appear.  This fixes it (and the original problem also):
case SQL_INT64:
tv64 = (ISC_INT64) *((ISC_INT64 *) data);
                        iv64 = (tv64 / (int) pow(10.0, (double) -scale));
                        fv64 = (ISC_INT64) abs((int) tv64 % (int) pow(10.0, (double)
-scale));
                        val->type = IS_STRING;
                        if ( tv64 < 0  &&  iv64 == 0 ) 
                                val->value.str.len = sprintf(string_data, "-0");
                        else
                                val->value.str.len = sprintf(string_data, "%Ld", 
iv64);
                        val->value.str.len += sprintf(string_data + val->value.str.len,
".%0*Ld", -scale, fv64);
                        val->value.str.val = estrdup(string_data);
                        break;

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/15151

-- 
Edit this bug report at http://bugs.php.net/?id=15151&edit=1

Reply via email to