Commit 9515610a authored by Danny Rosseau's avatar Danny Rosseau Committed by Rob Pike

encoding/gob: fix Debug to properly print uint

Fix debugger printing of uint that mistakenly
invoked .int64() instead of .uint64()

Fixes #21392

Change-Id: I107a7e87e0efbb06303c1e627dee76c369f75d1e
Reviewed-on: https://go-review.googlesource.com/54750Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: default avatarRob Pike <r@golang.org>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 46aa9f54
......@@ -1321,6 +1321,7 @@ func TestUnexportedFields(t *testing.T) {
var singletons = []interface{}{
true,
7,
uint(10),
3.2,
"hello",
[3]int{11, 22, 33},
......
......@@ -594,7 +594,7 @@ func (deb *debugger) printBuiltin(indent tab, id typeId) {
x := deb.int64()
fmt.Fprintf(os.Stderr, "%s%d\n", indent, x)
case tUint:
x := deb.int64()
x := deb.uint64()
fmt.Fprintf(os.Stderr, "%s%d\n", indent, x)
case tFloat:
x := deb.uint64()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment