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 Hu 1999-05-07 13:24:58 +00:00
parent 8a8beee081
commit 85484fbd41
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=46641

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;
}