summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-02-16 17:59:30 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-02-16 17:59:30 +0000
commit148fdce82df1ac559c9d6e6735c7582103c5c1b0 (patch)
tree1d22d7b1b86f1367036198e0d1f780b74a4aad2e /ext/mysqli/mysqli_api.c
parentc08bfd2e3f106bca81c3c1462d372d6c9e8a55d3 (diff)
downloadphp-git-148fdce82df1ac559c9d6e6735c7582103c5c1b0.tar.gz
Reverted lld -> lld patch and added explanation as to why it should not be
done.
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 4dcc3d4f94..e37a120a00 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -643,7 +643,11 @@ PHP_FUNCTION(mysqli_fetch)
my_ulonglong lval;
memcpy (&lval, stmt->bind[i].buffer, sizeof(my_ulonglong));
if (lval != (long)lval) {
- sprintf((char *)&tmp, "%llu", lval);
+ /* even though lval is declared as unsigned, the value
+ * may be negative. Therefor we cannot use %llu and must
+ * user %lld.
+ */
+ sprintf((char *)&tmp, "%lld", lval);
ZVAL_STRING(stmt->vars[i], tmp, 1);
} else {
ZVAL_LONG(stmt->vars[i], lval);