musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdlib/wcstoumax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/wcstoumax.c')
-rw-r--r--src/stdlib/wcstoumax.c 3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/stdlib/wcstoumax.c b/src/stdlib/wcstoumax.c
index e30b0638..af7ba3dc 100644
--- a/src/stdlib/wcstoumax.c
+++ b/src/stdlib/wcstoumax.c
@@ -8,7 +8,6 @@
uintmax_t wcstoumax(const wchar_t *s, wchar_t **p, int base)
{
struct intparse ip = {0};
- unsigned char tmp;
if (p) *p = (wchar_t *)s;
@@ -20,7 +19,7 @@ uintmax_t wcstoumax(const wchar_t *s, wchar_t **p, int base)
for (; iswspace(*s); s++);
ip.base = base;
- for (; *s<256 && (tmp=*s, __intparse(&ip, &tmp, 1)); s++);
+ for (; __intparse(&ip, (char[]){(*s&-(*s<128U))}, 1); s++);
if (p && ip.err != EINVAL)
*p = (wchar_t *)s;
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月17日 09:51:34 +0000

AltStyle によって変換されたページ (->オリジナル) /