We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 07d2622 + a949543 commit 843cae3Copy full SHA for 843cae3
Core/Chat/ChatReader.cs
@@ -67,6 +67,12 @@ public void Update(IAddonDataProvider reader)
67
sb.Clear();
68
69
int firstSpaceIdx = text.AsSpan().IndexOf(' ');
70
+ if (firstSpaceIdx == -1)
71
+ {
72
+ logger.LogError($"Malformed payload: {text}");
73
+ return;
74
+ }
75
+
76
string author = text.AsSpan(0, firstSpaceIdx).ToString();
77
string msg = text.AsSpan(firstSpaceIdx + 1).ToString();
78
0 commit comments