From 5ca44f6d85a0daa44c8f4f3af27dfebbf61ce902 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 18 Jul 2014 13:11:52 -0400 Subject: [PATCH] Check for a non-nil table before referencing its values. This fixes ticket 395 by @Shalimaar. --- OvaleBestAction.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua index 8336648..107ed15 100644 --- a/OvaleBestAction.lua +++ b/OvaleBestAction.lua @@ -992,7 +992,7 @@ function OvaleBestAction:ComputeLogical(element, state) Complement(timeSpanA, timeSpan) elseif element.operator == "or" then -- Short-circuit evaluation of left argument to OR. - if timeSpanA[1] == 0 and timeSpanA[1] == math.huge then + if timeSpanA and timeSpanA[1] == 0 and timeSpanA[2] == math.huge then timeSpan:Reset(timeSpanA) Ovale:Logf("[%d] logical '%s' short-circuits with universe as left argument", element.nodeId, element.operator, tostring(timeSpan)) else -- 1.7.9.5