diff options
| author | Danny Rosseau <daniel.rosseau@gmail.com> | 2017-08-10 13:08:23 -0600 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2017-08-25 10:22:07 +0000 |
| commit | 9515610afbbfafdde13052265f115a5e65d6756f (patch) | |
| tree | 6143af5f40dbe0c6c6010cea1dd6dbc63a2a52d9 /src/encoding | |
| parent | 46aa9f5437b000fad3696b0cd9fd97995da16411 (diff) | |
| download | go-9515610afbbfafdde13052265f115a5e65d6756f.tar.xz | |
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>
Diffstat (limited to 'src/encoding')
| -rw-r--r-- | src/encoding/gob/codec_test.go | 1 | ||||
| -rw-r--r-- | src/encoding/gob/debug.go | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/encoding/gob/codec_test.go b/src/encoding/gob/codec_test.go index eb9f306bcf..8f7b6f3c62 100644 --- a/src/encoding/gob/codec_test.go +++ b/src/encoding/gob/codec_test.go @@ -1321,6 +1321,7 @@ func TestUnexportedFields(t *testing.T) { var singletons = []interface{}{ true, 7, + uint(10), 3.2, "hello", [3]int{11, 22, 33}, diff --git a/src/encoding/gob/debug.go b/src/encoding/gob/debug.go index d69d36f516..8f93742f49 100644 --- a/src/encoding/gob/debug.go +++ b/src/encoding/gob/debug.go @@ -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() |
