changeset 156:2cf6fb157764

Fix a bug with the FS Cache
author Jonathan Pevarnek <pevarnj@gmail.com>
date Tue, 08 Nov 2011 09:29:22 -0500
parents 9ad854e6d994
children a6482018de66 180108494f08
files src/os/fs.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/fs.c	Fri Nov 04 15:30:17 2011 -0400
+++ b/src/os/fs.c	Tue Nov 08 09:29:22 2011 -0500
@@ -32,7 +32,7 @@
 	//number of blocks to store in the cache
 	FS_Cache = malloc(CacheCap*FSBLKSIZE);
 	if(!FS_Cache) return mkError(MODFS, ALLOCFAIL, ERROR);
-	CacheLocs = malloc(CacheCap);
+	CacheLocs = malloc(CacheCap*sizeof(u32));
 	if(!CacheLocs) return mkError(MODFS, ALLOCFAIL, ERROR);
 	CacheSize = 0;
 	CacheNext = 0;