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 := ""