Skip to content

Commit

Permalink
Merge pull request ddnet#7158 from Robyt3/Friendlist-Conchain-Fix
Browse files Browse the repository at this point in the history
Fix friendlist update conchain not working with optional argument
  • Loading branch information
heinrich5991 authored Sep 9, 2023
2 parents b951eab + 84e3c08 commit 96d7a9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/client/components/menus_browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
void CMenus::ConchainFriendlistUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
{
pfnCallback(pResult, pCallbackUserData);
if(pResult->NumArguments() == 2 && ((CMenus *)pUserData)->Client()->State() == IClient::STATE_OFFLINE)
if(pResult->NumArguments() >= 1 && ((CMenus *)pUserData)->Client()->State() == IClient::STATE_OFFLINE)
{
((CMenus *)pUserData)->FriendlistOnUpdate();
((CMenus *)pUserData)->Client()->ServerBrowserUpdate();
Expand All @@ -1738,6 +1738,6 @@ void CMenus::ConchainFriendlistUpdate(IConsole::IResult *pResult, void *pUserDat
void CMenus::ConchainServerbrowserUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
{
pfnCallback(pResult, pCallbackUserData);
if(pResult->NumArguments() && g_Config.m_UiPage == PAGE_FAVORITES)
if(pResult->NumArguments() >= 1 && g_Config.m_UiPage == PAGE_FAVORITES)
((CMenus *)pUserData)->ServerBrowser()->Refresh(IServerBrowser::TYPE_FAVORITES);
}

0 comments on commit 96d7a9d

Please sign in to comment.