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:
ad690c4
)
Prevent null concatenation when /deleteblocks is provided an incorrect format
author
kwolekr
<kwolekr@minetest.net>
Wed, 28 Jan 2015 03:36:53 +0000
(22:36 -0500)
committer
kwolekr
<kwolekr@minetest.net>
Wed, 28 Jan 2015 03:36:53 +0000
(22:36 -0500)
builtin/game/chatcommands.lua
patch
|
blob
|
history
diff --git
a/builtin/game/chatcommands.lua
b/builtin/game/chatcommands.lua
index 8ce1cfef58b135c8da74eb089c3bda1ec887e16c..2d94817e8f016fbef245c45a3edcdaec72e26756 100644
(file)
--- a/
builtin/game/chatcommands.lua
+++ b/
builtin/game/chatcommands.lua
@@
-420,6
+420,10
@@
core.register_chatcommand("deleteblocks", {
p2 = p1
else
local pos1, pos2 = unpack(param:split(") ("))
+ if pos1 == nil or pos2 == nil then
+ return false, "Incorrect area format. Expected: (x1,y1,z1) (x2,y2,z2)"
+ end
+
p1 = core.string_to_pos(pos1 .. ")")
p2 = core.string_to_pos("(" .. pos2)