From 38bfabeb38297c5cb63ef1bf034f4d6ff7622f3d Mon Sep 17 00:00:00 2001 From: janwas Date: Fri, 18 Jun 2004 14:59:50 +0000 Subject: [PATCH] fixed goto problem with gcc - was jumping over an (unused) var decl This was SVN commit r535. --- source/lib/res/vfs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(;;) {