fix bug entering cheats with values > 7FFFFFFF

This commit is contained in:
zeromus 2016-05-25 05:09:44 +00:00
parent 9767f79346
commit 82904b4a74
1 changed files with 4 additions and 1 deletions

View File

@ -250,7 +250,10 @@ INT_PTR CALLBACK CheatsAddProc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam
u32 tmp_addr = 0;
sscanf_s(editBuf[0], "%x", &tmp_addr);
if (cheats->add(searchAddSize, tmp_addr, atol(editBuf[1]), editBuf[2], searchAddFreeze))
s64 val;
sscanf(editBuf[1],"%lld",&val);
if (cheats->add(searchAddSize, tmp_addr, (u32)val, editBuf[2], searchAddFreeze))
{
if ((searchAddMode == 0) || (cheats->save() && (searchAddMode == 1 || searchAddMode == 2)))
{