Skip to content

Commit

Permalink
Builtin//misc_helpers: Various fixes (#7737)
Browse files Browse the repository at this point in the history
Remove unused variable 'seplen'.
Fix 'cparam2'->'param2'.
Do not initialise variable 'p' twice.
  • Loading branch information
paramat committed Sep 23, 2018
1 parent 8543df7 commit 4a2a112
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builtin/common/misc_helpers.lua
Expand Up @@ -168,7 +168,7 @@ function string.split(str, delim, include_empty, max_splits, sep_is_pattern)
delim = delim or ","
max_splits = max_splits or -1
local items = {}
local pos, len, seplen = 1, #str, #delim
local pos, len = 1, #str
local plain = not sep_is_pattern
max_splits = max_splits + 1
repeat
Expand Down Expand Up @@ -382,7 +382,7 @@ if INIT == "game" then
param2 = dirs1[fdir + 1]
elseif isceiling then
if orient_flags.force_facedir then
cparam2 = 20
param2 = 20
else
param2 = dirs2[fdir + 1]
end
Expand Down Expand Up @@ -495,7 +495,7 @@ function core.string_to_pos(value)
p.z = tonumber(p.z)
return p
end
local p = {}
p = {}
p.x, p.y, p.z = string.match(value, "^%( *([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+) *%)$")
if p.x and p.y and p.z then
p.x = tonumber(p.x)
Expand Down

0 comments on commit 4a2a112

Please sign in to comment.