From c6ff33d9c574753aa9f988a1d6ff1a96c7d35efd Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 24 Mar 2006 18:15:53 +0000 Subject: [PATCH] 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 --- Source/util.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/util.cpp b/Source/util.cpp index 252de218..a326d19a 100644 --- a/Source/util.cpp +++ b/Source/util.cpp @@ -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 ){