br0xen / boltbrowser

A CLI Browser for BoltDB Files
GNU General Public License v3.0
631 stars 91 forks source link

Numeric keys decoded as unsigned #42

Open utdrmac opened 4 years ago

utdrmac commented 4 years ago

The example itob function on github.com/etcd-io/bbolt for encoding integers accepts signed values. The browser does not take this into consideration on display and you get the below overflow:

1061401654: {"settings":{"missed":false,"success":true}}
1068588820: {"settings":{"missed":false,"success":false}}
18446743072381089533: {"settings":{"missed":true,"success":true}}

The 1844... number should be -1001328462083 when decoded. This is a display issue only as keys fetched from db within our app and decoded retain their correct value.