aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lpm.c2
1 files changed, 1 insertions, 1 deletions
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);
}