From be861a1c0dc16986fe318f5c4bdf5b3c9bdbd0be Mon Sep 17 00:00:00 2001 From: Bomb Bloke Date: Mon, 19 Jun 2017 13:09:06 +1000 Subject: [PATCH] Fix Bug with peripheral.find() Since #315 peripheral.find() doesn't work. This PR fix this. --- .../resources/assets/computercraft/lua/rom/apis/peripheral.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/computercraft/lua/rom/apis/peripheral.lua b/src/main/resources/assets/computercraft/lua/rom/apis/peripheral.lua index 7b8b51dcd..a9f675a23 100644 --- a/src/main/resources/assets/computercraft/lua/rom/apis/peripheral.lua +++ b/src/main/resources/assets/computercraft/lua/rom/apis/peripheral.lua @@ -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 = {}