From 7ce0684f695678f3dc7813e2612cc993bbc9bf43 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 21 Oct 1998 16:49:03 +0000 Subject: [PATCH] Was freeing the incorrect pointers -> crash in mallocs/frees. --- misc/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/main.c b/misc/main.c index f5511f3319..b981eec8ae 100644 --- a/misc/main.c +++ b/misc/main.c @@ -342,7 +342,7 @@ static BOOL32 MAIN_ParseDebugOptions(char *options) * RETURNS: * the numeric code of the language used by Windows (or 0x00) */ -int MAIN_GetLanguageID(char *Lang, char *Country, char *Charset, char *Dialect) +int MAIN_GetLanguageID(LPCSTR Lang,LPCSTR Country,LPCSTR Charset,LPCSTR Dialect) { char lang[3]="??", country[3]={0,0,0}; char *charset=NULL, *dialect=NULL; @@ -671,8 +671,8 @@ int MAIN_GetLanguageID(char *Lang, char *Country, char *Charset, char *Dialect) ret = LANG_NEUTRAL; end_MAIN_GetLanguageID: - if (Charset) free(Charset); - if (Dialect) free(Dialect); + if (Charset) free(charset); + if (Dialect) free(dialect); return ret; } -- 2.32.0.93.g670b81a890