1
0
mirror of https://github.com/golang/go synced 2024-11-19 14:54:43 -07:00

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/54750
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Danny Rosseau 2017-08-10 13:08:23 -06:00 committed by Rob Pike
parent 46aa9f5437
commit 9515610afb
2 changed files with 2 additions and 1 deletions

View File

@ -1321,6 +1321,7 @@ func TestUnexportedFields(t *testing.T) {
var singletons = []interface{}{
true,
7,
uint(10),
3.2,
"hello",
[3]int{11, 22, 33},

View File

@ -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()