From: John Hodge Date: Sun, 27 Sep 2009 10:23:20 +0000 (+0800) Subject: Fixed offset issue with slashNum X-Git-Tag: rel0.06~423 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=12e1d80b700a6a47e8506dc23bb6e1d64a172bd4;p=tpg%2Facess2.git Fixed offset issue with slashNum --- diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 2eccac23..9069a73d 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -89,9 +89,9 @@ char *VFS_GetAbsPath(char *Path) if(strncmp(&ret[read], "..", pos-read) == 0) { // If there is no higher, silently ignore - if(!slashNum) continue; + if(slashNum < 2) continue; // Reverse write pointer - write = slashOffsets[ --slashNum ]; + write = slashOffsets[ --slashNum - 1 ]; continue; } }