diff --git a/v2/common/value_context.go b/v2/common/value_context.go index 0887f0a..feb078c 100644 --- a/v2/common/value_context.go +++ b/v2/common/value_context.go @@ -396,14 +396,15 @@ func (vc *ValueContext) Values() (values interface{}, err error) { } else if vc.tagType == TypeUndefined { log.Panicf("will not parse undefined-type value") + // Never called. + return nil, nil + } else { + log.Panicf("value of type [%s] is unparseable", vc.tagType) // Never called. return nil, nil } - log.Panicf("value of type [%s] is unparseable", vc.tagType) - - // Never called. - return nil, nil + return values, nil } func init() { diff --git a/v2/ifd_enumerate.go b/v2/ifd_enumerate.go index 1099977..ed8b805 100644 --- a/v2/ifd_enumerate.go +++ b/v2/ifd_enumerate.go @@ -1499,7 +1499,7 @@ func FindIfdFromRootIfd(rootIfd *Ifd, ifdPath string) (ifd *Ifd, err error) { thisIfd = hit // If we didn't find the sibling, add it. - for i = 0; i < itii.Index; i++ { + for i := 0; i < itii.Index; i++ { if thisIfd.NextIfd == nil { log.Panicf("IFD [%s] does not have (%d) occurrences/siblings", thisIfd.ifdIdentity.UnindexedString(), itii.Index) }