PR: 10918

Submitted by:	Yung-Jen Hung <winard@u3717a.dorm.ccu.edu.tw>
Reviewed by:	bearscorp.bbs@bbs.life.nthu.edu.tw
_BIG5_sgetrune() in libc doesn't work well, this commit will fix it.
This commit is contained in:
foxfair 1999-05-07 13:24:58 +00:00
parent c1afe7bbe2
commit f631d477ba

View File

@ -82,10 +82,10 @@ _BIG5_sgetrune(string, n, result)
*result = string;
return (_INVALID_RUNE);
}
while (len-- >= 0)
while (--len >= 0)
rune = (rune << 8) | ((u_int)(*string++) & 0xff);
if (result)
*result = string + len;
*result = string;
return rune;
}