diff amr-constants.lua @ 28:4317e56e0a91

Fixed some crash issues with items and gems
author Adam tegen <adam.tegen@gmail.com>
date Fri, 17 Oct 2014 00:08:54 -0500
parents eca0f3b6d141
children 44c285acfff0
line wrap: on
line diff
--- a/amr-constants.lua	Wed Oct 15 19:08:21 2014 -0500
+++ b/amr-constants.lua	Fri Oct 17 00:08:54 2014 -0500
@@ -23,7 +23,7 @@
     --item.difficultyId = tonumber(parts[11])
     
     local numBonuses = tonumber(parts[12])
-    if numBonuses > 0 then
+    if numBonuses and numBonuses > 0 then
         item.bonusIds = {}
         for i = 13, 12 + numBonuses do
             table.insert(item.bonusIds, tonumber(parts[i]))