Skip to content

Commit

Permalink
handle if parsing userid fails
Browse files Browse the repository at this point in the history
  • Loading branch information
axellse committed Sep 22, 2024
1 parent cf11cd8 commit 8667167
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Bloxstrap/Integrations/ActivityWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,12 @@ private void ReadLogEntry(string entry)
return;
}

UInt64.TryParse(match.Groups[1].Value, out ulong result);
if (!UInt64.TryParse(match.Groups[1].Value, out ulong result))
{
App.Logger.WriteLine(LOG_IDENT, "Failed to parse userid from game join load time entry");
App.Logger.WriteLine(LOG_IDENT, match.Groups[1].Value);
return;
}

Data.UserId = result;
App.Logger.WriteLine(LOG_IDENT, $"Got userid as {Data.UserId}");
Expand Down

0 comments on commit 8667167

Please sign in to comment.