Piotr Caban (@piotr) commented about dlls/msvcrt/mbcs.c:
return (unsigned char *)cur - 1; /* ASCII CP or SB char */ }
+/*********************************************************************
_mbclen_l(MSVCRT.@)
- */
+size_t CDECL _mbclen_l(const unsigned char* str, _locale_t locale) +{
- return _ismbblead_l(*str, locale) ? 2 : 1;
While you're at it, could you please fix the function for lead-byte followed by '\0' case? In this case the function should return 1.