Fix ext2 driver errors.
This commit is contained in:
parent
873a4a6aed
commit
37532000a0
@ -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];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user