From 81593ef4b9cb8738dbe3a5ad9f34bb091b71013f Mon Sep 17 00:00:00 2001
From: David Adam <zanchey@ucc.gu.uwa.edu.au>
Date: Tue, 9 Jul 2024 15:27:15 +0800
Subject: [PATCH] client: actually skip unselectable items

4f9a370c introduced a bug where the wrong return value was chosen for
skipped items.
---
 src/client/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/client/menu.c b/src/client/menu.c
index 37728bc..9f7c419 100644
--- a/src/client/menu.c
+++ b/src/client/menu.c
@@ -372,7 +372,7 @@ int ShowItemAt(int Row, int Col, int Width, int Index, int bHilighted)
 	
 	// If the item isn't available for sale, return -1 (so it's skipped)
 	if( status == ITEM_STATUS_SOLDOUT || (price > giUserBalance && gbDisallowSelectWithoutBalance) )
-		Index = -2;
+		Index = -1;
 	
 	return Index;
 }
-- 
GitLab