msvcrt: Multi-byte characters handled incorrectly by MSVCRT_isleadbyte()
Nagato
nagatospam at gmail.com
Sun Nov 21 18:39:00 CST 2010
Test case:
_mbspbrk("C:\\age\\マブラヴオルタネイティヴ\\Alternative.rio.ici", ";,|*?\"<>{}[]");
Should return NULL.
None of the Japanese characters are interpreted as multi-byte by
MSVCRT_isleadbyte() so when _mbspbrk reaches 'マ' (0x837D) it matches
the '}' (0x7D) from the match string with the second byte of 'マ'.
---
dlls/msvcrt/ctype.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c
index 7e7d9f0..0fb3c41 100644
--- a/dlls/msvcrt/ctype.c
+++ b/dlls/msvcrt/ctype.c
@@ -138,7 +138,7 @@ int CDECL MSVCRT_isgraph(int c)
*/
int CDECL MSVCRT_isleadbyte(int c)
{
- return _isctype( c, MSVCRT__LEADBYTE );
+ return _ismbblead(c);
}
More information about the wine-patches
mailing list