You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
case tInt:
x := deb.int64()
fmt.Fprintf(os.Stderr, "%s%d\n", indent, x)
case tUint:
x := deb.int64()
fmt.Fprintf(os.Stderr, "%s%d\n", indent, x)
Notice how the case tUint branch calls x := deb.int64() instead of x := deb.uint64().
ALTree
changed the title
encoding/gob Debug function prints uint values incorrectly
encoding/gob: debug function prints uint values incorrectly
Aug 10, 2017
I submitted a fix this and that was the issue. The contribution guidelines just said to open an issue first. I'm not sure if I went about that wrong, if so, sorry.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Use the
Debug
function inencoding/gob
to try to view a gob. A simplified gob that has the error is here:(Sorry I can't put this in the playground as you need to build the gob package without the build guard for
Debug
)What did you expect to see?
Output of Debug should have been
What did you see instead?
Basically this was being treated as an integer and not an unsigned integer and so decoded with the
integer decoding method.
The text was updated successfully, but these errors were encountered: