msvcrt: __mb_cur_max is not updated in _setmbcp (with testcase) and should not be used in _ismbblead.

This commit is contained in:
Mikolaj Zalewski 2007-08-16 11:14:48 -07:00 committed by Alexandre Julliard
parent d068bdd820
commit e9ec5d4aff
2 changed files with 3 additions and 1 deletions

View File

@ -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);
}

View File

@ -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);
}