From 798e808e2bb76823fd99ef052a6064205dcbd723 Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Fri, 22 May 2015 14:00:55 +0100 Subject: [PATCH] Cast the process id GetProcessId returns a DWORD (which is unsigned) and the HighPart or a LARGE_INTEGER is a LONG (which is signed). As we are just doing some hashing it is fine to cast this. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index ad8f3eeb..e8109f4a 100644 --- a/src/main.c +++ b/src/main.c @@ -1136,7 +1136,7 @@ static void suggest_passwd(char *passwd) /* valid characters are 32 to 126 */ GetSystemTimeAsFileTime(&num.ft); - num.li.HighPart |= GetCurrentProcessId(); + num.li.HighPart |= (LONG)GetCurrentProcessId(); p = passwd; while (num.li.QuadPart) { u = (unsigned)(num.li.QuadPart % 95);