Quantcast

Changed some uses of #(table) to handle the indexed format

Kevin Lyles [12-19-09 - 20:39]
Changed some uses of #(table) to handle the indexed format
Filename
Regexps.lua
diff --git a/Regexps.lua b/Regexps.lua
index 2e4644f..6b8323b 100644
--- a/Regexps.lua
+++ b/Regexps.lua
@@ -159,7 +159,8 @@ function WeightsWatcher:multipleStats(text)
 			end
 		end
 	end
-	if #(stats) > 0 then
+	-- Don't return an empty table
+	for _, _ in pairs (stats) do
 		return stats
 	end
 end
@@ -181,7 +182,8 @@ function WeightsWatcher:damageRange(textL, textR)
 			stats["Speed"] = tonumber(speed)
 		end
 	end
-	if #(stats) > 0 then
+	-- Don't return an empty table
+	for _, _ in pairs (stats) do
 		return stats
 	end
 end