[Project64] in CheaeClassUI.cpp change std::strtoul to strtoul

This commit is contained in:
zilmar 2016-04-12 18:01:11 +10:00
parent 5942722436
commit 13cfd8b728
1 changed files with 3 additions and 3 deletions

View File

@ -829,11 +829,11 @@ int CALLBACK CCheatsUI::CheatsCodeQuantProc(HWND hDlg, uint32_t uMsg, uint32_t w
SetDlgItemText(hDlg, IDC_CHEAT_NAME, CheatName.c_str());
SetDlgItemText(hDlg, IDC_VALUE, Value.c_str());
Start = (uint16_t)(Range.c_str()[0] == '$' ? std::strtoul(&Range.c_str()[1], 0, 16) : atol(Range.c_str()));
Start = (uint16_t)(Range.c_str()[0] == '$' ? strtoul(&Range.c_str()[1], 0, 16) : atol(Range.c_str()));
const char * ReadPos = strrchr(Range.c_str(), '-');
if (ReadPos != NULL)
{
Stop = (uint16_t)(ReadPos[1] == '$' ? std::strtoul(&ReadPos[2], 0, 16) : atol(&ReadPos[1]));
Stop = (uint16_t)(ReadPos[1] == '$' ? strtoul(&ReadPos[2], 0, 16) : atol(&ReadPos[1]));
}
else
{
@ -854,7 +854,7 @@ int CALLBACK CCheatsUI::CheatsCodeQuantProc(HWND hDlg, uint32_t uMsg, uint32_t w
TCHAR szTmp[10], szTmp2[10];
uint32_t Value;
GetDlgItemText(hDlg, IDC_VALUE, szTmp, sizeof(szTmp));
Value = szTmp[0] == '$' ? std::strtoul(&szTmp[1], 0, 16) : std::strtoul(szTmp, 0, 16);
Value = szTmp[0] == '$' ? strtoul(&szTmp[1], 0, 16) : std::strtoul(szTmp, 0, 16);
if (Value > Stop) { Value = Stop; }
if (Value < Start) { Value = Start; }
sprintf(szTmp2, "$%X", Value);