From 63084cfc5cc83646f249b4896d0a353ed0d531e3 Mon Sep 17 00:00:00 2001 From: Vincent Lohse Date: Tue, 12 Nov 2024 12:50:22 +0000 Subject: [PATCH] Fix compiler warning --- pink/third/slash/slash/src/slash_string.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pink/third/slash/slash/src/slash_string.cc b/pink/third/slash/slash/src/slash_string.cc index cd3014ca..a307507f 100644 --- a/pink/third/slash/slash/src/slash_string.cc +++ b/pink/third/slash/slash/src/slash_string.cc @@ -422,7 +422,7 @@ int string2ul(const char *s, size_t slen, unsigned long *lval) { if (!string2ll(s,slen,&llval)) return 0; - if (llval > ULONG_MAX) + if (llval < 0 || llval > (long long)ULONG_MAX) return 0; *lval = (unsigned long)llval;