From a7f93408d7ceaa5d520e21b8cb220fa9c0e2bec5 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Thu, 1 Sep 2022 22:40:09 +0200 Subject: [PATCH] adjust #3499 fix to work on Lua 5.2 --- .../resources/assets/opencomputers/loot/openos/bin/edit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/opencomputers/loot/openos/bin/edit.lua b/src/main/resources/assets/opencomputers/loot/openos/bin/edit.lua index ff731845b..b1896cfa9 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/bin/edit.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/bin/edit.lua @@ -202,7 +202,7 @@ end local function setCursor(nbx, nby) local x, y, w, h = getArea() - nbx, nby = nbx // 1, nby // 1 + nbx, nby = math.floor(nbx), math.floor(nby) nby = math.max(1, math.min(#buffer, nby)) local ncy = nby - scrollY