Skip to content

Commit

Permalink
Fix uncaught overflow exception when parsing NetEntities from strings. (
Browse files Browse the repository at this point in the history
#4989)

* Fixed uncaught overflow exception when parsing NetEntities from strings.

* or
  • Loading branch information
Tayrtahn authored Mar 23, 2024
1 parent b7ea4d0 commit b9b565d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Robust.Shared/GameObjects/NetEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static bool TryParse(ReadOnlySpan<char> uid, out NetEntity entity)
entity = Parse(uid);
return true;
}
catch (FormatException)
catch (Exception ex) when (ex is FormatException or OverflowException)
{
entity = Invalid;
return false;
Expand Down

0 comments on commit b9b565d

Please sign in to comment.