aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/features/fs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/features/fs.c b/src/features/fs.c
index 123a178..65bbe8d 100644
--- a/src/features/fs.c
+++ b/src/features/fs.c
@@ -77,15 +77,14 @@ void *read_file(struct inode *in)
if (i < 12) {
blocknum = in->block[i];
data = buffer_read(blocknum);
- memcpy((u32 *)buf + i * BLOCK_SIZE, data, BLOCK_SIZE);
+ memcpy((u32 *)((u32)buf + i * BLOCK_SIZE), data, BLOCK_SIZE);
} else {
blocknum = read_indirect(indirect, i - 13);
data = buffer_read(blocknum);
- memcpy((u32 *)buf + (i - 1) * BLOCK_SIZE, data, BLOCK_SIZE);
+ memcpy((u32 *)((u32)buf + (i - 1) * BLOCK_SIZE), data, BLOCK_SIZE);
}
}
- // TODO: Fix space between 1024 and 4096
return buf;
}