games_updatesavailable: check for -1 to avoid bad pointer errors

This commit is contained in:
Marco Cawthorne 2021-01-24 01:54:14 +01:00
parent bf8f8e24cb
commit 70268440ee

View file

@ -59,7 +59,10 @@ game_updatesavailable(void)
for (int i = 0i; i < pkgcount; i++) {
int id = game_getpackageid(argv(i));
string status = getpackagemanagerinfo(id, GPMI_INSTALLED);
if (id == -1)
continue;
switch (status) {
case "":
if (updates[id].installed == "") {