Skip to content

Commit 57d54b6

Browse files
committed
Lua's mobdebug should not print anything to stdout.
This would pollute the terminal version's UI.
1 parent 05a3837 commit 57d54b6

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ FetchContent_Declare(lua_socket
1919
PATCH_COMMAND patch -N -p1 < ${src}/luasocket.patch)
2020
FetchContent_MakeAvailable(lua_socket)
2121
set(mobdebug_zip 0.80.zip)
22-
FetchContent_Declare(mobdebug URL https://github.com/pkulchenko/MobDebug/archive/${mobdebug_zip})
22+
FetchContent_Declare(mobdebug
23+
URL https://github.com/pkulchenko/MobDebug/archive/${mobdebug_zip}
24+
PATCH_COMMAND patch -N -p1 < ${src}/mobdebug.patch)
2325
FetchContent_MakeAvailable(mobdebug)
2426
set(deps_dir ${CMAKE_BINARY_DIR}/_deps)
2527
set(dkjson_tgz dkjson-2.5.tar.gz)

mobdebug.patch

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- a/src/mobdebug.lua 2025-10-17 10:51:18
2+
+++ b/src/mobdebug.lua 2025-10-17 10:41:10
3+
@@ -125,6 +125,7 @@
4+
error(deferror)
5+
end
6+
local function q(s) return string.gsub(s, '([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end
7+
+local print = function() end -- do not print anything to stdout
8+
9+
local serpent = (function() ---- include Serpent module for serialization
10+
local n, v = "serpent", "0.302" -- (C) 2012-18 Paul Kulchenko; MIT License

0 commit comments

Comments
 (0)