Skip to content

Commit

Permalink
fix sapling index block write order bug
Browse files Browse the repository at this point in the history
  • Loading branch information
undefinedopcode committed Feb 15, 2018
1 parent 9b15ceb commit 473401e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions disk/diskimagepd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ func (dsk *DSKWrapper) PRODOSWriteFile(path string, name string, kind ProDOSFile

fd.Publish(dsk)

dvdh.SetFileCount(vdh.GetFileCount() + 1)
dvdh.SetFileCount(dvdh.GetFileCount() + 1)
dvdh.Publish(dsk)

err = dsk.PRODOSMarkBlocks(freeBlocks, false)
Expand Down Expand Up @@ -1573,8 +1573,8 @@ func (dsk *DSKWrapper) PRODOSWriteSaplingBlocks(indexBlock int, dataBlocks []int
ib := make([]byte, 512)
for i, blocknum := range dataBlocks {
// index the block
ib[i*2+0] = byte(blocknum & 0xff)
ib[i*2+1] = byte(blocknum / 0x100)
ib[0+i] = byte(blocknum & 0xff)
ib[256+i] = byte(blocknum / 0x100)

// data offset...
ptr := 512 * i
Expand Down

0 comments on commit 473401e

Please sign in to comment.