summaryrefslogtreecommitdiff
path: root/plugins/MirLua/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/Modules')
-rw-r--r--plugins/MirLua/Modules/WinAPI/src/winapi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
index 82d5a9d5f3..991843de5a 100644
--- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
+++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
@@ -1155,7 +1155,7 @@ static int global_RegQueryValueEx(lua_State *L)
else {
rv = RegQueryValueExA(hsk, valuename, NULL, &type, (LPBYTE)szdata, &len);
if (rv == ERROR_SUCCESS)
- lua_pushlstring(L, szdata, len);
+ lua_pushlstring(L, szdata, mir_strlen(szdata));
else
lua_pushnil(L);
mir_free(szdata);