Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix "this ship name is already in use" bug
This rather insidious FRED bug was all down to an improper check for the current ship. It is possible for multiple objects of different types to be selected at the same time. If, for example, a waypoint and ship are selected, and the waypoint was selected first, the waypoint will be what `cur_object_index` refers to. Since the ship is the one and only ship selected, it will be what `single_ship` refers to. Therefore, to avoid flagging its own ship name as a duplicate, the loop should exclude the single ship, not the current object. The bug can be reliably triggered by selecting a waypoint, then adding a ship to the selection, then switching the focus to another application and back to FRED. This finally squashes the bug.
- Loading branch information