]> granicus.if.org Git - php/commitdiff
Fix Bug #60052 Integer returned as a 64bit integer on X64_86 for pdo_firebird
authorPopa Adrian Marius <mapopa@gmail.com>
Thu, 3 Dec 2015 14:14:17 +0000 (16:14 +0200)
committerPopa Adrian Marius <mapopa@gmail.com>
Thu, 3 Dec 2015 14:14:17 +0000 (16:14 +0200)
ext/pdo_firebird/firebird_statement.c

index 32cb59edc085977b5064e8c7167913e0d7b509cd..c482664f5a764c3eb9bb3f16ec39d3e14c78cdf7 100644 (file)
@@ -367,11 +367,11 @@ static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr,  /* {{
                                        break;
                                case SQL_LONG:
                                        *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
-                                       *len = slprintf(*ptr, CHAR_BUF_LEN, "%ld", *(ISC_LONG*)var->sqldata);
+                                       *len = slprintf(*ptr, CHAR_BUF_LEN, "%d", *(ISC_LONG*)var->sqldata);
                                        break;
                                case SQL_INT64:
                                        *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
-                                       *len = slprintf(*ptr, CHAR_BUF_LEN, "%" LL_MASK "d", *(ISC_INT64*)var->sqldata);
+                                       *len = slprintf(*ptr, CHAR_BUF_LEN, "%ld" LL_MASK "d", *(ISC_INT64*)var->sqldata);
                                        break;
                                case SQL_FLOAT:
                                        *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);