Skip to content

Commit

Permalink
Add an assert checking waypoint numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
SadPencil committed Jan 4, 2025
1 parent a9b3b33 commit 3375a2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DXMainClient/Domain/Multiplayer/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Point = Microsoft.Xna.Framework.Point;
using Utilities = Rampastring.Tools.Utilities;
using static System.Collections.Specialized.BitVector32;
using System.Diagnostics;

namespace DTAClient.Domain.Multiplayer
{
Expand Down Expand Up @@ -394,6 +395,7 @@ public bool SetInfoFromMpMapsINI(IniFile iniFile)
if (string.IsNullOrEmpty(waypoint))
break;

Debug.Assert(int.TryParse(waypoint, out _), $"waypoint should be a number, got {waypoint}");
waypoints.Add(waypoint);
}

Expand Down

0 comments on commit 3375a2c

Please sign in to comment.