Commit 9f532321 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Return error if last known character is further in the string then current character.

parent 5e10634a
......@@ -520,6 +520,9 @@ unsigned int CDECL _mbcjmstojis(unsigned int c)
*/
unsigned char* CDECL _mbsdec(const unsigned char* start, const unsigned char* cur)
{
if(start >= cur)
return NULL;
if(get_mbcinfo()->ismbcodepage)
return (unsigned char *)(_ismbstrail(start,cur-1) ? cur - 2 : cur -1);
......
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