mirror of
git://git.musl-libc.org/musl
synced 2024-12-17 04:05:05 +00:00
fix argument type error on wcwidth function
since the correct declaration was not visible, and since the representation of the types wchar_t and wint_t always match, a compiler would have to go out of its way to make this bug manifest, but better to fix it anyway.
This commit is contained in:
parent
129ca6c05d
commit
b0fc78520d
@ -1,4 +1,4 @@
|
||||
#include <wctype.h>
|
||||
#include <wchar.h>
|
||||
|
||||
static unsigned char table[] = {
|
||||
#include "nonspacing.h"
|
||||
@ -8,7 +8,7 @@ static unsigned char wtable[] = {
|
||||
#include "wide.h"
|
||||
};
|
||||
|
||||
int wcwidth(wint_t wc)
|
||||
int wcwidth(wchar_t wc)
|
||||
{
|
||||
if (wc < 0xffU)
|
||||
return (wc+1 & 0x7f) >= 0x21 ? 1 : wc ? -1 : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user