diff --git a/source/lib/res/vfs.cpp b/source/lib/res/vfs.cpp index 43273b5ad6..0661c3cd1e 100755 --- a/source/lib/res/vfs.cpp +++ b/source/lib/res/vfs.cpp @@ -129,6 +129,8 @@ static int path_validate(const uint line, const char* const path) const char* msg = 0; // error occurred <==> != 0 int err = -1; // pass error code to caller + int c = 0, last_c; + // disallow absolute path for safety, in case of *nix systems. if(path[0] == '/') { @@ -136,8 +138,6 @@ static int path_validate(const uint line, const char* const path) goto fail; } - int c = 0, last_c; - // scan each char in path string; count length. for(;;) {