Commit e9ec5d4a authored by Mikolaj Zalewski's avatar Mikolaj Zalewski Committed by Alexandre Julliard

msvcrt: __mb_cur_max is not updated in _setmbcp (with testcase) and should not…

msvcrt: __mb_cur_max is not updated in _setmbcp (with testcase) and should not be used in _ismbblead.
parent d068bdd8
......@@ -911,7 +911,7 @@ int CDECL _ismbckata(unsigned int c)
int CDECL _ismbblead(unsigned int c)
{
/* FIXME: should reference MSVCRT_mbctype */
return MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(c);
return MSVCRT_isleadbyte(c);
}
......
......@@ -78,8 +78,10 @@ static void test_swab( void ) {
static void test_ismbblead(void)
{
unsigned int s = '\354';
int mb_orig_max = __mb_cur_max;
_setmbcp(936);
ok(__mb_cur_max == mb_orig_max, "__mb_cur_max shouldn't be updated (is %d != %d)\n", __mb_cur_max, mb_orig_max);
todo_wine ok(_ismbblead(s), "got result %d\n", _ismbblead(s));
_setmbcp(1252);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment