commit 86e0bff4687d2253cb3a9218f9bbf39082aa22c4
Author: jtothebell <j.to.the.bell@gmail.com>
AuthorDate: Sun Mar 28 21:39:04 2021 -0600
Commit: jtothebell <j.to.the.bell@gmail.com>
CommitDate: Sun Mar 28 21:39:04 2021 -0600
band aid ipairs to handle nil
---
source/p8GlobalLuaFunctions.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/source/p8GlobalLuaFunctions.h b/source/p8GlobalLuaFunctions.h
index 872fa90..43e474f 100644
--- a/source/p8GlobalLuaFunctions.h
+++ b/source/p8GlobalLuaFunctions.h
@@ -94,6 +94,15 @@ pairs = function(x)
return function() end
end
+origipairs = ipairs
+ipairs = function(x)
+ if x ~= nil then
+ return origipairs(x)
+ end
+
+ return function() end
+end
+
---------------------------------
--Coroutines
---------------------------------