commit | cfd153439062f213d135e4c340ef07ca3e0f34ba | [log] [tgz] |
---|---|---|
author | Keith Randall <khr@google.com> | Tue Mar 27 12:27:00 2018 -0700 |
committer | Keith Randall <khr@golang.org> | Tue Mar 27 20:13:05 2018 +0000 |
tree | 3ac119f001e9a504fece27c8f4d96ddb3cb9adf7 | |
parent | fa2f8f44d6fca97976dd89e96ec7588f55853c93 [diff] |
debug/cmd/viewcore: fix printing of offsets If the destination of a pointer is past the known typing, just print the offset directly. Change-Id: I1794d53065d2be4e74df65d50a803e97ea1a34fe Reviewed-on: https://go-review.googlesource.com/102735 Reviewed-by: Peter Weinberger <pjw@google.com>
diff --git a/cmd/viewcore/html.go b/cmd/viewcore/html.go index f24223d..8756b8b 100644 --- a/cmd/viewcore/html.go +++ b/cmd/viewcore/html.go
@@ -344,7 +344,7 @@ return s } t, r := c.Type(x) - if t == nil { + if t == nil || i >= r*t.Size { return fmt.Sprintf("%s+%d", s, i) } idx := ""