From 7b5203baa2d160255ec5d1bbae38511d7a3ea552 Mon Sep 17 00:00:00 2001 From: ccjensen931 <32488004+ccjensen931@users.noreply.github.com> Date: Fri, 1 Mar 2019 16:48:02 -0700 Subject: [PATCH] Update Market.php Fixed the AcceptOffer function to not go out of bounds on the $village array --- GameEngine/Market.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameEngine/Market.php b/GameEngine/Market.php index 175a9e88..db084410 100755 --- a/GameEngine/Market.php +++ b/GameEngine/Market.php @@ -242,7 +242,7 @@ private function acceptOffer($get) } // We don't have enough resources - if($infoarray['wamt'] > ([$village->awood, $village->aclay, $village->airon, $village->acrop])[$infoarray['wtype']]) + if($infoarray['wamt'] > ([$village->awood, $village->aclay, $village->airon, $village->acrop])[$infoarray['wtype'] - 1]) { header("Location: build.php?id=".$get['id']."&t=1&e1"); exit;