1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-26 08:56:54 +00:00

Fix Bug with peripheral.find()

Since #315 peripheral.find() doesn't work. This PR fix this.
This commit is contained in:
Bomb Bloke 2017-06-19 13:09:06 +10:00 committed by GitHub
parent 93d1facbab
commit be861a1c0d

View File

@ -108,7 +108,7 @@ function find( sType, fnFilter )
if type( sType ) ~= "string" then
error( "bad argument #1 (expected string, got " .. type( sType ) .. ")", 2 )
end
if fnFilter ~= nil and type( fnFilter ) ~= "string" then
if fnFilter ~= nil and type( fnFilter ) ~= "function" then
error( "bad argument #2 (expected function, got " .. type( fnFilter ) .. ")", 2 )
end
local tResults = {}