diff --git a/register.1.16.go b/register.1.16.go index 2887a969..9e957b28 100644 --- a/register.1.16.go +++ b/register.1.16.go @@ -13,9 +13,11 @@ func registerFunc(md *moduledata, symPtr map[string]uintptr) { for _, f := range md.ftab { if int(f.funcoff) < len(md.pclntable) { _func := (*_func)(unsafe.Pointer((&(md.pclntable[f.funcoff])))) - name := gostringnocopy(&(md.funcnametab[_func.nameoff])) - if !strings.HasPrefix(name, TypeDoubleDotPrefix) && _func.entry < md.etext { - symPtr[name] = _func.entry + if int(_func.nameoff) < len(md.funcnametab) { + name := gostringnocopy(&(md.funcnametab[_func.nameoff])) + if !strings.HasPrefix(name, TypeDoubleDotPrefix) && _func.entry < md.etext { + symPtr[name] = _func.entry + } } } }