aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug/pe/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/debug/pe/file.go')
-rw-r--r--src/pkg/debug/pe/file.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/debug/pe/file.go b/src/pkg/debug/pe/file.go
index a2859bf370..d0005bacf3 100644
--- a/src/pkg/debug/pe/file.go
+++ b/src/pkg/debug/pe/file.go
@@ -72,6 +72,9 @@ type ImportDirectory struct {
func (s *Section) Data() ([]byte, error) {
dat := make([]byte, s.sr.Size())
n, err := s.sr.ReadAt(dat, 0)
+ if n == len(dat) {
+ err = nil
+ }
return dat[0:n], err
}