msvcrt: Use correct locale when comparing strings in getenv.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b633777ed4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Piotr Caban 2019-03-17 20:19:50 +01:00 committed by Michael Stefaniuc
parent d3eecb9bf2
commit ff1ce89f62
2 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,7 @@ char * CDECL MSVCRT_getenv(const char *name)
{
char *str = *environ;
char *pos = strchr(str,'=');
if (pos && ((pos - str) == length) && !strncasecmp(str,name,length))
if (pos && ((pos - str) == length) && !MSVCRT__strnicmp(str,name,length))
{
TRACE("(%s): got %s\n", debugstr_a(name), debugstr_a(pos + 1));
return pos + 1;

View File

@ -1143,6 +1143,7 @@ void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_
const MSVCRT_wchar_t *file, unsigned int line, MSVCRT_uintptr_t arg);
int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t);
int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t);
int __cdecl MSVCRT__strnicmp(const char*, const char*, MSVCRT_size_t);
int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
unsigned int __cdecl MSVCRT__get_output_format(void);