From 2ea15a5673c6a78e95f2b043a5ae2dc1e48348ce Mon Sep 17 00:00:00 2001 From: Bill Medland Date: Sun, 21 Nov 2004 15:42:03 +0000 Subject: [PATCH] Don't mess up the msvcrt codepage on e.g. _MB_CP_ANSI. --- dlls/msvcrt/locale.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 0a669fa738f..33b39ce3ccf 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -515,8 +515,13 @@ const char* _Strftime(char *out, unsigned int len, const char *fmt, /********************************************************************* * _setmbcp (MSVCRT.@) */ -void _setmbcp(int cp) +int _setmbcp(int cp) { + if (cp < 0) + { + FIXME ("Unreal codepages (e.g. %d) not implemented\n", cp); + return 0; /* Let's not confuse the caller by returning -1 */ + } LOCK_LOCALE; if (msvcrt_current_lc_all_cp != cp) { @@ -524,6 +529,7 @@ void _setmbcp(int cp) msvcrt_current_lc_all_cp = cp; } UNLOCK_LOCALE; + return 0; } /*********************************************************************