Skip to content

Commit

Permalink
limit value to 99999999
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Mar 9, 2022
1 parent 20d4d8e commit 4accd8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ void GuiCheats::draw()
} else if (m_searchMode == SEARCH_MODE_EQA) {
searchValue_t value;
m_debugger->readMemory(&value, sizeof value, address);
if (value._f64 == floor(value._f64)) {
if (value._f64 == floor(value._f64) && value._f64 < 100000000 && value._f64 > -100000000) {
ss << " D( " << _getAddressDisplayString(address, m_debugger, SEARCH_TYPE_FLOAT_64BIT) << " )";
} else if (value._s32 < 100000000 && value._s32 > -100000000) {
ss << " ( " << _getAddressDisplayString(address, m_debugger, SEARCH_TYPE_SIGNED_32BIT) << " )";
Expand Down Expand Up @@ -4402,7 +4402,7 @@ void GuiCheats::onInput(u32 kdown)
searchValue_t value;
searchType_t m_EQAType;
m_debugger->readMemory(&value, sizeof value, address);
if (value._f64 == floor(value._f64))
if (value._f64 == floor(value._f64) && value._f64 < 100000000 && value._f64 > -100000000)
m_EQAType = SEARCH_TYPE_FLOAT_64BIT;
else if (value._s32 < 100000000 && value._s32 > -100000000)
m_EQAType = SEARCH_TYPE_SIGNED_32BIT;
Expand Down

0 comments on commit 4accd8a

Please sign in to comment.