Fixed bug at21691 (Podunk)

This commit is contained in:
David Anderson 2005-11-19 21:38:50 +00:00
parent 71926e6d03
commit a5bd8463e8

View File

@ -1227,7 +1227,10 @@ static void setconfig(char *root)
GetModuleFileName(NULL,path,_MAX_PATH);
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
/* see www.autopackage.org for the BinReloc module */
strncpy(path,SELFPATH,sizeof path);
ptr = SELFPATH;
if (!ptr)
ptr = root;
strncpy(path,ptr,sizeof path);
#else
if (root!=NULL)
strncpy(path,root,sizeof path); /* path + filename (hopefully) */