From 20e86ca1fe004c15c760016e53c8f56a09fcd35a Mon Sep 17 00:00:00 2001 From: TsingShui <73029250+TsingShui@users.noreply.github.com> Date: Wed, 16 Oct 2024 20:40:03 +0800 Subject: [PATCH] Fix corrected improper use of `reader` and `bReader` Co-authored-by: x_123 --- experimental/libbox/profile_import.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/experimental/libbox/profile_import.go b/experimental/libbox/profile_import.go index 258c175a9f..17671e560f 100644 --- a/experimental/libbox/profile_import.go +++ b/experimental/libbox/profile_import.go @@ -218,7 +218,7 @@ func DecodeProfileContent(data []byte) (*ProfileContent, error) { if err != nil { return nil, err } - err = binary.Read(reader, binary.BigEndian, &content.Type) + err = binary.Read(bReader, binary.BigEndian, &content.Type) if err != nil { return nil, err } @@ -233,17 +233,17 @@ func DecodeProfileContent(data []byte) (*ProfileContent, error) { } } if content.Type == ProfileTypeRemote || (version == 0 && content.Type != ProfileTypeLocal) { - err = binary.Read(reader, binary.BigEndian, &content.AutoUpdate) + err = binary.Read(bReader, binary.BigEndian, &content.AutoUpdate) if err != nil { return nil, err } if version >= 1 { - err = binary.Read(reader, binary.BigEndian, &content.AutoUpdateInterval) + err = binary.Read(bReader, binary.BigEndian, &content.AutoUpdateInterval) if err != nil { return nil, err } } - err = binary.Read(reader, binary.BigEndian, &content.LastUpdated) + err = binary.Read(bReader, binary.BigEndian, &content.LastUpdated) if err != nil { return nil, err }