msvcrt: Validate character in _ismbcl0.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Piotr Caban 2019-02-14 14:35:19 +01:00 committed by Alexandre Julliard
parent 64453ea28b
commit 622c218cb2
2 changed files with 4 additions and 1 deletions

View File

@ -2560,7 +2560,7 @@ int CDECL _ismbcl0(unsigned int c)
if(get_mbcinfo()->mbcodepage == 932)
{
/* JIS non-Kanji */
return (c >= 0x8140 && c <= 0x889e);
return _ismbclegal(c) && c >= 0x8140 && c <= 0x889e;
}
return 0;
}

View File

@ -3288,6 +3288,9 @@ static void test__ismbclx(void)
ret = _ismbcl0(0x8140);
ok(ret, "got %d\n", ret);
ret = _ismbcl0(0x817f);
ok(!ret, "got %d\n", ret);
_setmbcp(cp);
}