From e83a1c6c84a323636122b81919a56426e6ba4e7d Mon Sep 17 00:00:00 2001 From: Zeroday BYTE <47859767+odaysec@users.noreply.github.com> Date: Fri, 4 Apr 2025 01:11:20 +0700 Subject: [PATCH] Update config.go (#1353) --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index b1531e9..5510324 100644 --- a/config/config.go +++ b/config/config.go @@ -243,7 +243,7 @@ func (c *C) GetInt(k string, d int) int { // GetUint32 will get the uint32 for k or return the default d if not found or invalid func (c *C) GetUint32(k string, d uint32) uint32 { r := c.GetInt(k, int(d)) - if uint64(r) > uint64(math.MaxUint32) { + if r < 0 || uint64(r) > uint64(math.MaxUint32) { return d } return uint32(r)