php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch fix_pdo_dblib_MONEY_seg_fault_5.2.14 for PDO related Bug #52546Patch version 2010-08-05 20:07 UTC Return to Bug #52546 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:
Developer: rgagnon24@gmail.com--- dblib_stmt.c 2010-03-08 06:39:44.000000000 -0600 +++ dblib_stmt.c.bak 2010-08-05 10:44:59.000000000 -0500 @@ -170,8 +170,11 @@ case SQLMONEY4: case SQLMONEYN: { DBFLT8 money_value; + val->len = 32 + (2 * dbdatlen(H->link, i+1)); + val->data = emalloc(val->len); dbconvert(NULL, S->cols[i].coltype, dbdata(H->link, i+1), dbdatlen(H->link, i+1), SQLFLT8, (LPBYTE)&money_value, val->len); - val->len = spprintf(val->data, 0, "%.4f", money_value); + sprintf(val->data, "%f", money_value); + val->len = strlen(val->data); } break; default: |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Nov 21 19:01:29 2024 UTC |