Merge pull request #350 from marconett/macos-cheat-fix

macOS cheats: fixed variable rename oversight; typecasting
This commit is contained in:
OV2 2018-06-28 23:14:52 +02:00 committed by GitHub
commit 645f47187a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -273,7 +273,7 @@ static void InitCheatItems (void)
static void ImportCheatItems (void)
{
int cheat_num = std::min(Cheat.g.size(), MAC_MAX_CHEATS);
int cheat_num = std::min((int)Cheat.g.size(), MAC_MAX_CHEATS);
for (unsigned int i = 0; i < cheat_num; i++)
{
citem[i].valid = true;

View File

@ -1297,7 +1297,7 @@ static void CheatFinderHandleAddEntryButton (WindowData *cf)
if (cfAddress[cfListSelection] > (0x20000 - cfViewNumBytes))
PlayAlertSound();
else
if (Cheat.g.size() + cfViewNumBytes > MAX_CHEATS)
if (Cheat.g.size() + cfViewNumBytes > MAC_MAX_CHEATS)
AppearanceAlert(kAlertCautionAlert, kS9xMacAlertCFCantAddEntry, kS9xMacAlertCFCantAddEntryHint);
else
CheatFinderBeginAddEntrySheet(cf);