Skip to content

Commit

Permalink
fix: y8s4 missing players
Browse files Browse the repository at this point in the history
  • Loading branch information
redraskal committed Jan 24, 2024
1 parent f80a75f commit 7d15930
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 588 deletions.
6 changes: 5 additions & 1 deletion dissect/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func (r *Reader) readChunkedData(br *bufio.Reader) error {
}
pattern := []byte{0x32, 0x30, 0x30, 0x56, 0x52, 0x50, 0x4D, 0x43}
i := 0
r.b = []byte{}
zstdReader, _ := zstd.NewReader(bytes.NewReader([]byte{}))
for !errors.Is(err, io.EOF) {
log.Debug().Msg("scanning for dissect frame")
Expand Down Expand Up @@ -160,6 +159,7 @@ type match struct {
func (r *Reader) worker(start int, end int, wg *sync.WaitGroup, matches chan<- match) {
defer wg.Done()
indexes := make([]int, len(r.queries))
log.Debug().Int("start", start).Int("end", end).Msg("worker")
for i := start; i <= end; i++ {
for j, query := range r.queries {
if r.b[i] == query[indexes[j]] {
Expand Down Expand Up @@ -338,3 +338,7 @@ func (r *Reader) Uint64() (uint64, error) {
}
return binary.LittleEndian.Uint64(b), nil
}

func (r *Reader) Write(w io.Writer) (n int, err error) {
return w.Write(r.b)
}
Binary file not shown.

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 7d15930

Please sign in to comment.