Skip to content

Commit ffa1bb2

Browse files
authored
Merge pull request scp-fs2open#7261 from Goober5000/fix_assert
fix waypoint list assertions
2 parents 1869b00 + baf2f95 commit ffa1bb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

code/object/waypoint.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ void waypoint_stuff_name(STR &dest, int waypoint_instance)
109109
{
110110
int wl_index, wp_index;
111111
calc_waypoint_indexes(waypoint_instance, wl_index, wp_index);
112-
Assertion(wl_index >= 0, "Waypoint list must exist!");
113-
Assertion(Waypoint_lists.in_bounds(wp_index), "Waypoint index must be in bounds!");
112+
Assertion(Waypoint_lists.in_bounds(wl_index), "Waypoint list index must be in bounds!");
113+
Assertion(Waypoint_lists[wl_index].get_waypoints().in_bounds(wp_index), "Waypoint index must be in bounds!");
114114
waypoint_stuff_name(dest, Waypoint_lists[wl_index].get_name(), wp_index + 1);
115115
}
116116

0 commit comments

Comments
 (0)