Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Add lower bound version check
Browse files Browse the repository at this point in the history
Cause there will be hell if an alternative SHV API reports a negative
number somehow.
  • Loading branch information
ikt32 committed Jun 23, 2017
1 parent c8f6288 commit 59bcb5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Gears/Util/Versions.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ enum G_GameVersion : int {
};

static std::string eGameVersionToString(int version) {
if (version > GameVersionString.size() - 1) {
if (version > GameVersionString.size() - 1 || version < 0) {
return std::to_string(version);
}
return GameVersionString[version];
Expand Down

0 comments on commit 59bcb5a

Please sign in to comment.