Skip to content

Commit

Permalink
Fix for the "cannot find rank for" issue
Browse files Browse the repository at this point in the history
If you can't find the rank, don't crash please
  • Loading branch information
Xottab-DUTY committed Aug 14, 2017
1 parent b538813 commit 63868c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/xrGame/ui/Restrictions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ u32 get_rank(const shared_str& section)
}
}

R_ASSERT3(res != -1, "cannot find rank for", section.c_str());
if (res == -1)
{
Msg("Setting rank to 0. Cannot find rank for: [%s]", section.c_str());
// Xottab_DUTY: I'm not sure if it's save to leave it -1
res = 0;
}
//R_ASSERT3(res != -1, "cannot find rank for", section.c_str());
return res;
}

Expand Down

0 comments on commit 63868c7

Please sign in to comment.