Skip to content

Commit c03dbea

Browse files
authored
Merge pull request #1349 from MageKing17/bugfix/avoid-rank-int3
Avoid Int3() when finding a rank with an out-of-order points value.
2 parents 9107da8 + 1abb183 commit c03dbea

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

code/stats/scoring.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,10 @@ void parse_rank_tbl()
105105
required_string("#End");
106106

107107
// be sure that all rank points are in order
108-
#ifndef NDEBUG
109108
for (idx = 0; idx < NUM_RANKS - 1; idx++) {
110109
if (Ranks[idx].points >= Ranks[idx + 1].points)
111-
Int3();
110+
Warning(LOCATION, "Rank #%d (%s) has a higher \"$Points:\" value (%d) than the following rank (%s, %d points). This shouldn't actually crash FSO, but it might result in unexpected or incorrect behavior.\n", idx + 1, Ranks[idx].name, Ranks[idx].points, Ranks[idx+1].name, Ranks[idx+1].points);
112111
}
113-
#endif
114112
}
115113
catch (const parse::ParseException& e)
116114
{

0 commit comments

Comments
 (0)