From e811ab6c89a1c2a7eaad427f639dfb539341c406 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Sun, 6 Jan 2008 23:46:44 +0000 Subject: [PATCH] * Fix a compile error (needed to use OR '|', not a comma ',') * Fix a warning due to the strange WinAPI (needs a char* but uses it as a char**) git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3402 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index c7f8f1a4f..b4ac14f39 100644 --- a/src/main.c +++ b/src/main.c @@ -227,7 +227,7 @@ static bool getCurrentDir(char * const dest, size_t const size) char* err_string; // Retrieve a string describing the error number (uses LocalAlloc() to allocate memory for err_string) - FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER, FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, &err_string, 0, NULL); + FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, (char*)&err_string, 0, NULL); // Print an error message with the above description debug(LOG_ERROR, "getPlatformUserDir: GetCurrentDirectoryA failed (error code: %d): %s", err, err_string);