From a5bd8463e856bf15dd3cd448a497b2a3623da12e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 19 Nov 2005 21:38:50 +0000 Subject: [PATCH] Fixed bug at21691 (Podunk) --- compiler/libpc300/sc1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/libpc300/sc1.c b/compiler/libpc300/sc1.c index ba3d160f..0427dffd 100755 --- a/compiler/libpc300/sc1.c +++ b/compiler/libpc300/sc1.c @@ -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) */