From 4c7ac50dd8e57fe2a0650c638ec27e2b3d60f90a Mon Sep 17 00:00:00 2001 From: SquidDev Date: Thu, 27 Dec 2018 09:09:37 +0000 Subject: [PATCH] Fix a rather silly typo I wonder if it'd be possible to extend LuaCheck to detect such cases? --- src/main/resources/assets/computercraft/lua/rom/apis/window.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/computercraft/lua/rom/apis/window.lua b/src/main/resources/assets/computercraft/lua/rom/apis/window.lua index 7f901cfd2..90d179a17 100644 --- a/src/main/resources/assets/computercraft/lua/rom/apis/window.lua +++ b/src/main/resources/assets/computercraft/lua/rom/apis/window.lua @@ -425,7 +425,7 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible ) function window.reposition( nNewX, nNewY, nNewWidth, nNewHeight ) if type( nNewX ) ~= "number" then error( "bad argument #1 (expected number, got " .. type( nNewX ) .. ")", 2 ) end if type( nNewY ) ~= "number" then error( "bad argument #2 (expected number, got " .. type( nNewY ) .. ")", 2 ) end - if nNewWidth ~= nil or nNewWidth ~= nil then + if nNewWidth ~= nil or nNewHeight ~= nil then if type( nNewWidth ) ~= "number" then error( "bad argument #3 (expected number, got " .. type( nNewWidth ) .. ")", 2 ) end if type( nNewHeight ) ~= "number" then error( "bad argument #4 (expected number, got " .. type( nNewHeight ) .. ")", 2 ) end end