aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_parsecfg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index 621369d45..36c7bccf0 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -76,8 +76,9 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
* already declared via inclusions done in setup header file.
* We assume that we are using the ASCII version here.
*/
- int n = GetModuleFileNameA(0, filebuffer, sizeof(filebuffer));
- if(n > 0 && n < (int)sizeof(filebuffer)) {
+ unsigned long len = GetModuleFileNameA(0, filebuffer,
+ sizeof(filebuffer));
+ if(len > 0 && len < sizeof(filebuffer)) {
/* We got a valid filename - get the directory part */
char *lastdirchar = strrchr(filebuffer, '\\');
if(lastdirchar) {