Fixup %EXECUTABLE% code.

git-svn-id: file:///svn/unbound/trunk@3553 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2015-11-30 15:13:09 +00:00
parent 453ff48e89
commit ae7c49cb0b

View file

@ -340,7 +340,7 @@ service_init(int r, struct daemon** d, struct config_file** c)
/* get executable path, and if that contains
* directories, snip off the filename part */
dirbuf[0] = 0;
if(!GetModuleFileName(NULL, path+1, MAX_PATH))
if(!GetModuleFileName(NULL, dirbuf, MAX_PATH))
log_err("could not GetModuleFileName");
if(strrchr(dirbuf, '\\')) {
(strrchr(dirbuf, '\\'))[0] = 0;