Skip to content

Commit

Permalink
lxfs: fix division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 30, 2024
1 parent bd3f1c6 commit 2f5b720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/lxfs/src/blockio.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ uint64_t lxfsNextBlock(Mountpoint *mp, uint64_t block) {
// read the relevant part of the block table
uint64_t tableBlock = block / (mp->blockSizeBytes / 8);
tableBlock += 33; // the first 33 blocks are reserved
uint64_t tableIndex = block % (mp->blockSizeBytes % 8);
uint64_t tableIndex = block % (mp->blockSizeBytes / 8);

if(lxfsReadBlock(mp, tableBlock, mp->blockTableBuffer)) return 0;

Expand Down

0 comments on commit 2f5b720

Please sign in to comment.