prettyprint: fix index out of range error (#2131)
api.(*Variable).recursiveKind should not assume that a pointer is always fully loaded. Fixes #2130
This commit is contained in:
parent
9c83866c72
commit
930fa3b734
@ -291,6 +291,9 @@ func (v *Variable) recursiveKind() (reflect.Kind, bool) {
|
||||
kind = v.Kind
|
||||
if kind == reflect.Ptr {
|
||||
hasptr = true
|
||||
if len(v.Children) == 0 {
|
||||
return kind, hasptr
|
||||
}
|
||||
v = &(v.Children[0])
|
||||
} else {
|
||||
break
|
||||
|
||||
Loading…
Reference in New Issue
Block a user