msvcrt: Return error if last known character is further in the string then current character.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5e10634a5a
commit
9f532321d0
|
@ -520,6 +520,9 @@ unsigned int CDECL _mbcjmstojis(unsigned int c)
|
||||||
*/
|
*/
|
||||||
unsigned char* CDECL _mbsdec(const unsigned char* start, const unsigned char* cur)
|
unsigned char* CDECL _mbsdec(const unsigned char* start, const unsigned char* cur)
|
||||||
{
|
{
|
||||||
|
if(start >= cur)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if(get_mbcinfo()->ismbcodepage)
|
if(get_mbcinfo()->ismbcodepage)
|
||||||
return (unsigned char *)(_ismbstrail(start,cur-1) ? cur - 2 : cur -1);
|
return (unsigned char *)(_ismbstrail(start,cur-1) ? cur - 2 : cur -1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue