Skip to content

Commit

Permalink
Fix crash when hovering the search result
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Jul 11, 2023
1 parent 9cd59f6 commit cfda2ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gframe/deck_con.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ void DeckBuilder::GetHoveredCard() {
return;
const int offset = (mainGame->scrFilter->getPos() % DECK_SEARCH_SCROLL_STEP) * -1.f * 0.65f;
auto seq = (y - 165 - offset) / 66;
int pos = (mainGame->scrFilter->getPos() / DECK_SEARCH_SCROLL_STEP) + hovered_seq;
int pos = (mainGame->scrFilter->getPos() / DECK_SEARCH_SCROLL_STEP) + seq;

if(pos >= static_cast<int>(results.size()))
return;
Expand Down

0 comments on commit cfda2ea

Please sign in to comment.