1
0
mirror of https://github.com/golang/go synced 2024-09-29 15:34:30 -06:00
This commit is contained in:
Jes Cok 2024-02-10 09:18:19 +08:00
parent ee9c6678d5
commit cacdf0a279

View File

@ -262,7 +262,7 @@ func NewFile(r io.ReaderAt) (*File, error) {
}
r2 := r
if scnptr == 0 { // .bss must have all 0s
r2 = new(nobitsSectionReader)
r2 = &nobitsSectionReader{}
}
s.sr = io.NewSectionReader(r2, int64(scnptr), int64(s.Size))
s.ReaderAt = s.sr