Skip to content

Commit

Permalink
Fixed Linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
JaCzekanski committed Sep 14, 2020
1 parent 74bbb3d commit f7045f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils/gameshark.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <climits>
#include <string>
#include <fstream>
#include <vector>
Expand Down Expand Up @@ -52,19 +53,19 @@ struct Gameshark {
char *end;
GamesharkCode code;
code.opcode = std::strtoul(line.substr(0, 2).c_str(), &end, 16);
if (code.opcode == ULONG_MAX) {
if (code.opcode == UINT_MAX) {
continue;
}
code.address = std::strtoul(line.substr(2, 6).c_str(), &end, 16);
if (code.address == ULONG_MAX) {
if (code.address == UINT_MAX) {
continue;
}
std::string space = line.substr(8, 1);
if (space != " ") {
continue;
}
code.value = std::strtoul(line.substr(9, 4).c_str(), &end, 16);
if (code.value == ULONG_MAX) {
if (code.value == UINT_MAX) {
continue;
}
gamesharkCheat.codes.push_back(code);
Expand Down

0 comments on commit f7045f4

Please sign in to comment.