From c18dc2249da3401423b9f080f87aedacd28136fb Mon Sep 17 00:00:00 2001
From: extraes <52384576+extraes@users.noreply.github.com>
Date: Tue, 27 Jan 2026 00:41:59 -0800
Subject: [PATCH 1/4] add missing event enums
---
Modio/Models/Response/Mod.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Modio/Models/Response/Mod.cs b/Modio/Models/Response/Mod.cs
index 3eac5d8..3c50002 100644
--- a/Modio/Models/Response/Mod.cs
+++ b/Modio/Models/Response/Mod.cs
@@ -475,4 +475,14 @@ public enum ModEventType
/// A user has joined or left the mod team.
///
MOD_TEAM_CHANGED,
+
+ ///
+ /// A new comment was left on the mod.
+ ///
+ MOD_COMMENT_ADDED,
+
+ ///
+ /// A comment was deleted from a mod.
+ ///
+ MOD_COMMENT_DELETED,
}
\ No newline at end of file
From 4e9db6a85fbc48a7022aaa07214a627439986e2e Mon Sep 17 00:00:00 2001
From: extraes <52384576+extraes@users.noreply.github.com>
Date: Mon, 24 Aug 2026 18:29:50 -0700
Subject: [PATCH 2/4] avoid integer underflow by making "remaining" a huge
signed type. the method already seems to treat it like it can go under zero
with the while condition
---
Modio/Clients/SearchClient.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Modio/Clients/SearchClient.cs b/Modio/Clients/SearchClient.cs
index e209d9b..34b2b70 100644
--- a/Modio/Clients/SearchClient.cs
+++ b/Modio/Clients/SearchClient.cs
@@ -79,7 +79,8 @@ public async IAsyncEnumerable ToEnumerable()
public async IAsyncEnumerable> ToPagedEnumerable()
{
var (method, path) = this.route;
- uint? remaining = null;
+ // Avoid integer underflow when
+ long? remaining = null;
do
{
var req = new Request(method, path);
@@ -92,6 +93,7 @@ public async IAsyncEnumerable> ToPagedEnumerable()
remaining ??= result.Total;
remaining -= result.Count;
+
var limit = result.Limit;
var offset = result.Offset;
From 582e17346c0f83012e1f8a9458b76375a421e3fc Mon Sep 17 00:00:00 2001
From: extraes <52384576+extraes@users.noreply.github.com>
Date: Mon, 24 Aug 2026 18:32:28 -0700
Subject: [PATCH 3/4] Fix comment and whitespace
---
Modio/Clients/SearchClient.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Modio/Clients/SearchClient.cs b/Modio/Clients/SearchClient.cs
index 34b2b70..e679287 100644
--- a/Modio/Clients/SearchClient.cs
+++ b/Modio/Clients/SearchClient.cs
@@ -79,7 +79,7 @@ public async IAsyncEnumerable ToEnumerable()
public async IAsyncEnumerable> ToPagedEnumerable()
{
var (method, path) = this.route;
- // Avoid integer underflow when
+ // Huge integer type that does signed arithmetic and encompasses uint's max value
long? remaining = null;
do
{
@@ -93,7 +93,6 @@ public async IAsyncEnumerable> ToPagedEnumerable()
remaining ??= result.Total;
remaining -= result.Count;
-
var limit = result.Limit;
var offset = result.Offset;
From a18d64c340c845cc5b79cc346b4032197a954e1a Mon Sep 17 00:00:00 2001
From: extraes <52384576+extraes@users.noreply.github.com>
Date: Mon, 24 Aug 2026 18:49:41 -0700
Subject: [PATCH 4/4] Also early-out for empty responses
---
Modio/Clients/SearchClient.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Modio/Clients/SearchClient.cs b/Modio/Clients/SearchClient.cs
index e679287..a82fde4 100644
--- a/Modio/Clients/SearchClient.cs
+++ b/Modio/Clients/SearchClient.cs
@@ -94,6 +94,10 @@ public async IAsyncEnumerable> ToPagedEnumerable()
remaining ??= result.Total;
remaining -= result.Count;
+ // Don't bother returning anything or continuing for an empty response
+ if (result.Count == 0)
+ yield break;
+
var limit = result.Limit;
var offset = result.Offset;