diff --git a/src/main/resources/assets/opencomputers/lua/kernel.lua b/src/main/resources/assets/opencomputers/lua/kernel.lua index 98382f573..319d55fdf 100644 --- a/src/main/resources/assets/opencomputers/lua/kernel.lua +++ b/src/main/resources/assets/opencomputers/lua/kernel.lua @@ -577,7 +577,7 @@ do checkArg(3, repl, "number", "string", "function", "table") checkArg(4, n, "number", "nil") - if #s < SHORT_STRING then + if #s < SHORT_STRING or type(repl) == "function" then return string_gsub(s, pattern, repl, n) end