From acbab034cc408da4dcadb40a311823cd5d343f41 Mon Sep 17 00:00:00 2001 From: Mike Nelson Date: Wed, 30 Aug 2023 22:03:48 -0500 Subject: [PATCH] wtf (#5579) --- code/scripting/api/objs/shipwepselect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/scripting/api/objs/shipwepselect.cpp b/code/scripting/api/objs/shipwepselect.cpp index a66dfdc205d..225c11ee333 100644 --- a/code/scripting/api/objs/shipwepselect.cpp +++ b/code/scripting/api/objs/shipwepselect.cpp @@ -191,7 +191,7 @@ ADE_INDEXER(l_Loadout_Amount, ship_info* sip = &Ship_info[current.getBank()->ship_class]; int widx = current.getBank()->wep[idx]; if (widx >= 0 && widx < (int)Weapon_info.size()) { - weapon_info* wip = &Weapon_info[idx]; + weapon_info* wip = &Weapon_info[widx]; int capacity = 0; // Calculate max capacity of the weapon in the current bank if (wip->subtype == WP_LASER) {