Skip to content

Commit

Permalink
Fix corrected improper use of reader and bReader
Browse files Browse the repository at this point in the history
Co-authored-by: x_123 <x@a>
  • Loading branch information
TsingShui and x_123 authored Oct 16, 2024
1 parent 166a45a commit 20e86ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions experimental/libbox/profile_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 20e86ca

Please sign in to comment.