Debian Codegraph @

debian/patches/0001-fix-integer-constant-overflow-on-32-bit-systems.patch

raw
1 From 1e52f6152a9b262873f831bb5a94bcd29ef38c38 Mon Sep 17 00:00:00 2001
2 From: Zachary Snow <[email protected]>
3 Date: Wed, 3 Aug 2016 10:00:57 -0400
4 Subject: [PATCH] fix integer constant overflow on 32-bit systems
5
6 ---
7 bson/json.go | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10 diff --git a/bson/json.go b/bson/json.go
11 index d37f8350..09df8260 100644
12 --- a/bson/json.go
13 +++ b/bson/json.go
14 @@ -317,7 +317,7 @@ func jencNumberLong(v interface{}) ([]byte, error) {
15 func jencInt(v interface{}) ([]byte, error) {
16 n := v.(int)
17 f := `{"$numberLong":"%d"}`
18 - if n <= 1<<53 {
19 + if int64(n) <= 1<<53 {
20 f = `%d`
21 }
22 return fbytes(f, n), nil