Skip to content

Commit 5fbb52a

Browse files
tannevaledclaude
andcommitted
embedwad: add ReadAt to wadFile so gore.Run can open the embedded WAD
doom.go:40794 asserts the WAD file is an io.ReaderAt for random-access lump reads. Added pass-through to bytes.Reader.ReadAt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ec0d754 commit 5fbb52a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

embedwad/embedwad.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ func (w *wadFile) Read(p []byte) (int, error) { return w.r.Read(p) }
5757
func (w *wadFile) Close() error { return nil }
5858
func (w *wadFile) Seek(off int64, w2 int) (int64, error) { return w.r.Seek(off, w2) }
5959

60+
// ReadAt satisfies io.ReaderAt — required by gore's w_Read path which
61+
// asserts the WAD file is an io.ReaderAt for random-access lump
62+
// reading (doom.go:40794). bytes.Reader has ReadAt; just delegate.
63+
func (w *wadFile) ReadAt(p []byte, off int64) (int, error) { return w.r.ReadAt(p, off) }
64+
6065
type wadInfo struct{ f *wadFS }
6166

6267
func (i wadInfo) Name() string { return i.f.name }

0 commit comments

Comments
 (0)