From bf8f8e24cb537d90f9ce564e76517f3b7b2f027e Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sun, 24 Jan 2021 00:13:01 +0100 Subject: [PATCH] game_updateinstallcount: Always return 1 when no packagenames are given --- src/menu-fn/m_customgame.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/menu-fn/m_customgame.cpp b/src/menu-fn/m_customgame.cpp index b831d1cb..66ae231c 100644 --- a/src/menu-fn/m_customgame.cpp +++ b/src/menu-fn/m_customgame.cpp @@ -95,6 +95,11 @@ game_updateinstallcount(void) { int count; + /* always return something positive when no packages are defined */ + if (games[gameinfo_current].pkgname == "") { + return 1; + } + /* look for the valid packages in the gameinfo pkgname */ int pkgcount = tokenize(games[gameinfo_current].pkgname);