summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-04-09 09:05:39 -0400
committerKacper Michajłow <kasper93@gmail.com>2024-04-09 20:09:43 +0200
commitf167d18ec8333c0cbb41c8f588e9d9c861afa0d9 (patch)
treed72932a3e5ff80b41c6054a20876b0883134e677 /player
parent58eae25fbf6d3c9e999a44aa444211dc16a834fe (diff)
downloadmpv-f167d18ec8333c0cbb41c8f588e9d9c861afa0d9.tar.bz2
mpv-f167d18ec8333c0cbb41c8f588e9d9c861afa0d9.tar.xz
player/lua: fix trailing whitespace for mp.log output
Previously it always inserts a whitespace after an arg because i > 0 is always true.
Diffstat (limited to 'player')
-rw-r--r--player/lua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua.c b/player/lua.c
index b2548387f6..63547694e2 100644
--- a/player/lua.c
+++ b/player/lua.c
@@ -512,7 +512,7 @@ static int script_log(lua_State *L)
const char *s = lua_tostring(L, -1);
if (s == NULL)
return luaL_error(L, "Invalid argument");
- mp_msg(ctx->log, msgl, "%s%s", s, i > 0 ? " " : "");
+ mp_msg(ctx->log, msgl, (i == 2 ? "%s" : " %s"), s);
lua_pop(L, 1); // args... tostring
}
mp_msg(ctx->log, msgl, "\n");