shithub: riscv

Download patch

ref: 75f5fdbb0df902d8d7e16a4489a04d92493eacae
parent: 6056f3eb21c2ef885cba92e5cfc462cb22511fde
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Jun 9 14:00:13 EDT 2023

strtoull: fix return value on overflow

--- a/sys/src/libc/port/strtoull.c
+++ b/sys/src/libc/port/strtoull.c
@@ -1,7 +1,7 @@
 #include <u.h>
 #include <libc.h>
 
-#define UVLONG_MAX	(1LL<<63)
+#define UVLONG_MAX	(~0ULL)
 
 uvlong
 strtoull(char *nptr, char **endptr, int base)