From: John Hodge Date: Sun, 27 Sep 2009 10:30:20 +0000 (+0800) Subject: Fixed string being copied offset X-Git-Tag: rel0.06~420 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=0a4d3990606a8c9873f4b96079a6e67fb0a2b48a;p=tpg%2Facess2.git Fixed string being copied offset --- diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index c0bbbed8..a3746147 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -32,7 +32,7 @@ char *VFS_GetAbsPath(char *Path) int pathLen = strlen(Path); int read, write; int pos, slashNum=1, baseLen; - Uint slashOffsets[MAX_PATH_SLASHES] = {0}; + Uint slashOffsets[MAX_PATH_SLASHES] = {1}; char *cwd = CFGPTR(CFG_VFS_CWD); int cwdLen; @@ -100,7 +100,7 @@ char *VFS_GetAbsPath(char *Path) // Only copy if the positions differ if(read != write) { Log("write = %i, read = %i", write, read); - memcpy( &ret[write], &ret[read], pos-read+1 ); + memcpy( &ret[write], &ret[read], pos-read ); } write = pos+1; if(slashNum < MAX_PATH_SLASHES)