fixed compile errors and warnings in get_executable_path
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4607 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
f0bc9907e5
commit
c6ff33d9c5
1 changed files with 4 additions and 3 deletions
|
@ -656,12 +656,13 @@ string get_executable_path(const char* argv0) {
|
|||
assert(rc == 0);
|
||||
return string(temp_buf);
|
||||
#else /* Linux/BSD/POSIX/etc */
|
||||
const char *path = getenv("_");
|
||||
if( path != NULL ) return get_full_path( path );
|
||||
const char *envpath = getenv("_");
|
||||
if( envpath != NULL ) return get_full_path( envpath );
|
||||
else {
|
||||
char* pathtmp;
|
||||
char* path;
|
||||
size_t len = 100;
|
||||
int nchars;
|
||||
size_t nchars;
|
||||
while(1){
|
||||
pathtmp = (char*)realloc(path,len+1);
|
||||
if( pathtmp == NULL ){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue