projects
/
platform
/
upstream
/
ejdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92000e8
)
Fixed #54
author
adam
<adamansky@gmail.com>
Fri, 22 Mar 2013 11:05:53 +0000
(18:05 +0700)
committer
adam
<adamansky@gmail.com>
Fri, 22 Mar 2013 11:05:53 +0000
(18:05 +0700)
tcejdb/bson.c
patch
|
blob
|
history
diff --git
a/tcejdb/bson.c
b/tcejdb/bson.c
index
1bffd76
..
bac9afa
100644
(file)
--- a/
tcejdb/bson.c
+++ b/
tcejdb/bson.c
@@
-1270,7
+1270,7
@@
void bson_fatal_msg(int ok, const char *msg) {
extern const char bson_numstrs[1000][4];
EJDB_EXPORT void bson_numstr(char *str, int64_t i) {
- if (i < 1000)
+ if (i
>= 0 && i
< 1000)
memcpy(str, bson_numstrs[i], 4);
else
bson_sprintf(str, "%lld", (long long int) i);