Skip to content
Snippets Groups Projects
Commit 2255ca07 authored by rswindell's avatar rswindell
Browse files

Fixed prep_dir() for use on FreeBSD - _fullpath (macro for realpath)...

Fixed prep_dir() for use on FreeBSD - _fullpath (macro for realpath) initializes the entire MAX_PATH bytes of the destination string.
parent 846b8941
No related branches found
No related tags found
No related merge requests found
......@@ -427,6 +427,7 @@ char* DLLCALL prep_dir(char* base, char* path)
char *p;
#endif
char str[LEN_DIR*2];
char abspath[MAX_PATH+1];
if(!path[0])
return(path);
......@@ -444,9 +445,10 @@ char* DLLCALL prep_dir(char* base, char* path)
backslashcolon(str);
strcat(str,"."); // Change C: to C:. and C:\SBBS\ to C:\SBBS\.
_fullpath(path,str,LEN_DIR+1); // Change C:\SBBS\NODE1\..\EXEC to C:\SBBS\EXEC
backslash(path);
_fullpath(abspath,str,LEN_DIR+1); // Change C:\SBBS\NODE1\..\EXEC to C:\SBBS\EXEC
backslash(abspath);
sprintf(path,"%.*s",LEN_DIR,abspath);
return(path);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment