Avoid shadowing of names in peripheral.isPresent

Fixes #415
This commit is contained in:
SquidDev 2020-04-21 08:51:49 +01:00
parent cea8be7efa
commit 7c1154ddfc
1 changed files with 3 additions and 3 deletions

View File

@ -54,9 +54,9 @@ function isPresent(name)
end
for n = 1, #sides do
local name = sides[n]
if native.getType(name) == "modem" and not native.call(name, "isWireless") and
native.call(name, "isPresentRemote", name)
local side = sides[n]
if native.getType(side) == "modem" and not native.call(side, "isWireless") and
native.call(side, "isPresentRemote", name)
then
return true
end