From e03e0adfed6f98343f739884f462d13f65967a62 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Thu, 2 Apr 2015 13:58:12 +0200 Subject: [PATCH] removed incorrect casts to DWORD in WideCharToMultiByte calls --- src/whereami.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whereami.c b/src/whereami.c index 80eda1e..3433d28 100644 --- a/src/whereami.c +++ b/src/whereami.c @@ -73,10 +73,10 @@ static int WAI_PREFIX(getModulePath_)(HMODULE module, char* out, int capacity, i path = buffer1; _wfullpath(buffer2, path, MAX_PATH); - length_ = WideCharToMultiByte(CP_UTF8, 0, buffer2, -1, out, (DWORD)capacity, NULL, NULL); + length_ = WideCharToMultiByte(CP_UTF8, 0, buffer2, -1, out, capacity, NULL, NULL); if (length_ == 0) - length_ = WideCharToMultiByte(CP_UTF8, 0, buffer2, -1, NULL, (DWORD)0, NULL, NULL); + length_ = WideCharToMultiByte(CP_UTF8, 0, buffer2, -1, NULL, 0, NULL, NULL); if (length_ == 0) break;