From 4127f7c9b4b82ac68c3e545018e49b4952e4774b Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 3 Mar 2024 14:40:28 -0500 Subject: Jesus christ, widnows. --- src/lpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lpm.c b/src/lpm.c index beef23b..6816ae1 100644 --- a/src/lpm.c +++ b/src/lpm.c @@ -77,7 +77,7 @@ static const char* lua_toutf8(lua_State* L, LPCWSTR str) { if (output) { len = WideCharToMultiByte(CP_UTF8, 0, str, -1, output, len, NULL, NULL); if (len) { - lua_pushlstring(L, output, len); + lua_pushlstring(L, output, len - 1); free(output); return lua_tostring(L, -1); } -- cgit v1.2.3