From 7c9106a361e25a6c7d5bc65b701f936e4df98695 Mon Sep 17 00:00:00 2001 From: Jason Koch Date: Mon, 27 Mar 2023 09:27:52 -0700 Subject: [PATCH] perffile: fix: ensure file event attributes are collected without overwriting previous fixes #8 --- perffile/reader.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perffile/reader.go b/perffile/reader.go index 866f259..edda9dc 100644 --- a/perffile/reader.go +++ b/perffile/reader.go @@ -108,8 +108,9 @@ func New(r io.ReaderAt) (*File, error) { if err := readSlice(attr.IDs.sectionReader(r), &ids); err != nil { return nil, err } + attrCopy := attr.Attr for _, id := range ids { - file.idToAttr[id] = &attr.Attr + file.idToAttr[id] = &attrCopy } }