Don't use broken mblen() on AROS
This commit is contained in:
parent
afd11628fd
commit
acddeb3ae2
|
@ -83,12 +83,25 @@ bool cCharUtil::PeekNextChar( const TSTRING::const_iterator& cur,
|
|||
}
|
||||
|
||||
first = cur;
|
||||
|
||||
if (!(*cur))
|
||||
{
|
||||
last = cur;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef __AROS__
|
||||
mblen (NULL, 0);
|
||||
int len = mblen(&*cur, MB_CUR_MAX);
|
||||
if (len < 0) //invalid multibyte sequence, but let's not blow up.
|
||||
len = 1;
|
||||
|
||||
last = cur + len;
|
||||
#else // AROS mblen() seems broken (as of 6/2016) so don't use it.
|
||||
last = cur + 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue