diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp
index 27f7b088e..93036b031 100644
--- a/src/g_shared/a_weapons.cpp
+++ b/src/g_shared/a_weapons.cpp
@@ -1297,7 +1297,7 @@ void FWeaponSlots::SetFromGameInfo()
 	// Append extra weapons to the slots.
 	for (i = 0; i < NUM_WEAPON_SLOTS; ++i)
 	{
-		for (unsigned j = 0; j < gameinfo.DefaultWeaponSlots[i].Size(); i++)
+		for (unsigned j = 0; j < gameinfo.DefaultWeaponSlots[i].Size(); j++)
 		{
 			PClassWeapon *cls = dyn_cast<PClassWeapon>(PClass::FindClass(gameinfo.DefaultWeaponSlots[i][j]));
 			if (cls == NULL)