From 87871017f6bcda9be443799e32619a9ebf508a7d Mon Sep 17 00:00:00 2001 From: Mercury233 Date: Fri, 10 Jul 2026 14:55:07 +0800 Subject: [PATCH] fix clicking LISTBOX_LOG --- gframe/event_handler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gframe/event_handler.cpp b/gframe/event_handler.cpp index 099cc4b94a..256455aa30 100644 --- a/gframe/event_handler.cpp +++ b/gframe/event_handler.cpp @@ -1978,7 +1978,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { switch(id) { case LISTBOX_LOG: { int sel = mainGame->lstLog->getSelected(); - if(sel != -1 && (int)mainGame->logParam.size() >= sel && mainGame->logParam[sel]) { + if(sel >= 0 && (int)mainGame->logParam.size() > sel && mainGame->logParam[sel] > 0) { mainGame->ShowCardInfo(mainGame->logParam[sel]); } return true; @@ -1991,7 +1991,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { switch(id) { case LISTBOX_LOG: { int sel = mainGame->lstLog->getSelected(); - if(sel != -1 && (int)mainGame->logParam.size() >= sel && mainGame->logParam[sel]) { + if(sel >= 0 && (int)mainGame->logParam.size() > sel && mainGame->logParam[sel] > 0) { mainGame->wInfos->setActiveTab(0); } return true;