summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale
diff options
context:
space:
mode:
authorfoxfair <foxfair@FreeBSD.org>1999-05-07 13:24:58 +0000
committerfoxfair <foxfair@FreeBSD.org>1999-05-07 13:24:58 +0000
commitf631d477bafcb4783e751ae710a5d0fc0264ae4f (patch)
treea5942c097db888dfbd61642c0ec2037ba1881eb6 /lib/libc/locale
parentc1afe7bbe25d479fb86ffe597401929339c59395 (diff)
downloadFreeBSD-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/libc/locale')
-rw-r--r--lib/libc/locale/big5.c4
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;
}
OpenPOWER on IntegriCloud