projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b04872d
)
Add checks for nil in minetest.after
author
ShadowNinja
<shadowninja@minetest.net>
Sun, 13 Apr 2014 21:50:46 +0000
(17:50 -0400)
committer
ShadowNinja
<shadowninja@minetest.net>
Sun, 13 Apr 2014 21:54:00 +0000
(17:54 -0400)
builtin/misc.lua
patch
|
blob
|
history
diff --git
a/builtin/misc.lua
b/builtin/misc.lua
index 1d5e146c60cc7b182f88c714ca9b542786bc4417..f91f5e095d7c3a04728463dac19a9557cf9fd891 100644
(file)
--- a/
builtin/misc.lua
+++ b/
builtin/misc.lua
@@
-21,6
+21,8
@@
minetest.register_globalstep(function(dtime)
end)
function minetest.after(time, func, ...)
+ assert(tonumber(time) and type(func) == "function",
+ "Invalid minetest.after invocation")
table.insert(minetest.timers_to_add, {time=time, func=func, args={...}})
end