mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-24 09:31:30 +00:00
Fix corrected improper use of reader
and bReader
Co-authored-by: x_123 <x@a>
This commit is contained in:
parent
e93d0408be
commit
956ee361df
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue