- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values)

This commit is contained in:
Felipe Pena 2010-08-05 23:32:18 +00:00
parent 1e17bb2aab
commit f171aefb31
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2010, PHP 5.3.4
- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
(Felipe)
- Fixed bug #52534 (var_export array with negative key). (Felipe)
- Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW).
(Felipe)

View File

@ -170,7 +170,7 @@ static int pdo_dblib_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
case SQLMONEY4:
case SQLMONEYN: {
DBFLT8 money_value;
dbconvert(NULL, S->cols[i].coltype, dbdata(H->link, i+1), dbdatlen(H->link, i+1), SQLFLT8, (LPBYTE)&money_value, val->len);
dbconvert(NULL, S->cols[i].coltype, dbdata(H->link, i+1), dbdatlen(H->link, i+1), SQLFLT8, (LPBYTE)&money_value, 8);
val->len = spprintf(val->data, 0, "%.4f", money_value);
}
break;