diff options
author | Albert Choy <albert.choy@osii.com> | 2015-04-14 14:06:26 -0500 |
---|---|---|
committer | Albert Choy <albert.choy@osii.com> | 2015-04-14 14:06:26 -0500 |
commit | ff1602c15bf5a002aaebdd7371d7e472824f62a5 (patch) | |
tree | 9d98b5e02bafa5be64856dcddc3cc7851870b4d9 | |
parent | 430e50e0a941b586376aa2ce3cfe38532c92a0de (diff) | |
download | ejdb-ff1602c15bf5a002aaebdd7371d7e472824f62a5.tar.gz ejdb-ff1602c15bf5a002aaebdd7371d7e472824f62a5.tar.bz2 ejdb-ff1602c15bf5a002aaebdd7371d7e472824f62a5.zip |
Fix _parse_qobj_impl() to handle BSON_LONG in Windows
Fix conversion of int64_t to string in printf modifier using PRId64
-rw-r--r-- | src/ejdb/ejdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ejdb/ejdb.c b/src/ejdb/ejdb.c index aecf605..e8ebeba 100644 --- a/src/ejdb/ejdb.c +++ b/src/ejdb/ejdb.c @@ -5035,7 +5035,8 @@ static int _parse_qobj_impl(EJDB *jb, EJQ *q, bson_iterator *it, TCLIST *qlist, if (ftype == BSON_LONG || ftype == BSON_INT || ftype == BSON_DATE) { qf.exprlongval = bson_iterator_long(it); qf.exprdblval = qf.exprlongval; - qf.expr = tcsprintf("%ld", qf.exprlongval); + // 2015-04-14: Change to use standard format string for int64_t + qf.expr = tcsprintf("%" PRId64, qf.exprlongval); } else { qf.exprdblval = bson_iterator_double(it); qf.exprlongval = (int64_t) qf.exprdblval; |