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
c1afe7bbe2
commit
f631d477ba
@ -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 New Issue
Block a user