Skip to content

Commit

Permalink
Fix compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
olapiv committed Nov 12, 2024
1 parent f88f8fd commit 63084cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pink/third/slash/slash/src/slash_string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 63084cf

Please sign in to comment.