diff options
author | foxfair <foxfair@FreeBSD.org> | 1999-05-07 13:24:58 +0000 |
---|---|---|
committer | foxfair <foxfair@FreeBSD.org> | 1999-05-07 13:24:58 +0000 |
commit | f631d477bafcb4783e751ae710a5d0fc0264ae4f (patch) | |
tree | a5942c097db888dfbd61642c0ec2037ba1881eb6 /lib | |
parent | c1afe7bbe25d479fb86ffe597401929339c59395 (diff) | |
download | FreeBSD-src-f631d477bafcb4783e751ae710a5d0fc0264ae4f.zip FreeBSD-src-f631d477bafcb4783e751ae710a5d0fc0264ae4f.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/locale/big5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/locale/big5.c b/lib/libc/locale/big5.c index 213ef50..9294f0c 100644 --- a/lib/libc/locale/big5.c +++ b/lib/libc/locale/big5.c @@ -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; } |