mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
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:
parent
8a8beee081
commit
85484fbd41
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=46641
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue