Fix ext2 driver errors.

This commit is contained in:
pjht 2019-04-07 14:12:45 -05:00
parent 873a4a6aed
commit 37532000a0

View File

@ -63,8 +63,8 @@ int read_char(inode inode,FILE* f,int pos,int num) {
} }
} else if (block<268) { } else if (block<268) {
uint32_t* blocks=read_blk(inode.i_block[12],f,num); uint32_t* blocks=read_blk(inode.i_block[12],f,num);
if (blocks[i]==0) { if (blocks[block-12]==0) {
return -1 return -1;
} else { } else {
return ((char*)read_blk(blocks[block],f,num))[pos]; return ((char*)read_blk(blocks[block],f,num))[pos];
} }