Fixed offset issue with slashNum
[tpg/acess2.git] / Kernel / vfs / open.c
index 2eccac2..9069a73 100644 (file)
@@ -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;
                        }
                }

UCC git Repository :: git.ucc.asn.au