From 4580f1056703a2b673bea883eb547ce028344320 Mon Sep 17 00:00:00 2001 From: Wilma456 Date: Sun, 18 Jun 2017 15:58:06 +0200 Subject: [PATCH] Fix Bug with peripheral.find() --- .../assets/computercraft/lua/rom/apis/peripheral.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 9ab5b6fa9..7b8b51dcd 100644 --- a/src/main/resources/assets/computercraft/lua/rom/apis/peripheral.lua +++ b/src/main/resources/assets/computercraft/lua/rom/apis/peripheral.lua @@ -105,8 +105,8 @@ function wrap( _sSide ) end function find( sType, fnFilter ) - if type( _sSide ) ~= "string" then - error( "bad argument #1 (expected string, got " .. type( _sSide ) .. ")", 2 ) + if type( sType ) ~= "string" then + error( "bad argument #1 (expected string, got " .. type( sType ) .. ")", 2 ) end if fnFilter ~= nil and type( fnFilter ) ~= "string" then error( "bad argument #2 (expected function, got " .. type( fnFilter ) .. ")", 2 )