Fix minor string manipulation crash

This commit is contained in:
Starbeamrainbowlabs 2020-09-15 02:00:24 +01:00
parent 5ad44e7c31
commit 0ddf160e84
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -189,7 +189,7 @@ function worldeditadditions.parse_weighted_nodes(parts, as_list, func_normalise)
else node_name = func_normalise(part) end else node_name = func_normalise(part) end
if not node_name then if not node_name then
return false, "Error: Invalid number '"..chance.."'" return false, "Error: Invalid number '"..tostring(part).."'"
end end
if last_node_name then if last_node_name then
if as_list then table.insert(result, { node = last_node_name, weight = 1 }) if as_list then table.insert(result, { node = last_node_name, weight = 1 })