summarylogtreecommitdiffstats
path: root/lua_strlen_fix.patch
blob: 8b610532f4813d4dcc3459cfda611b34a03b37c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/scripting/lua/hooks.c b/src/scripting/lua/hooks.c
index b94745a2..56f8c9bd 100644
--- a/src/scripting/lua/hooks.c
+++ b/src/scripting/lua/hooks.c
@@ -144,7 +144,7 @@ script_hook_pre_format_html(va_list ap, void *data)
 	if (err) return EVENT_HOOK_STATUS_NEXT;
 
 	if (lua_isstring(L, -1)) {
-		int len = lua_strlen(L, -1);
+		int len = lua_rawlen(L, -1);
 
 		add_fragment(cached, 0, (unsigned char *) lua_tostring(L, -1), len);
 		normalize_cache_entry(cached, len);