Home | Zones | Log in | Register

Cannot generate valid invite with "Limit uses" set

bug reports invites

Nobody

From: Tiko at 2021-06-15 05:47:32

diff --git a/zone/invite.go b/zone/invite.go
index 2c5c85c..3c1355d 100644
--- a/zone/invite.go
+++ b/zone/invite.go
@@ -50,7 +50,7 @@ func (inv Invite) Remaining() int {
        if inv.Max == 0 && inv.Uses == 0 {
                return 1 // backwards compat
        }
-       if inv.Max >= inv.Uses {
+       if inv.Max < inv.Uses {
                return 0
        }
        return inv.Max - inv.Uses

this is why u dont name ur variables ambiguous stuff like Uses

oh shit, i didn’t know the backend was written in go. lmk if you ever want backend help.

Reply:
To reply to this thread, please join this community.
1 person is reading this thread now.
← Thread List | ↑ Top