summarylogtreecommitdiffstats
path: root/lua_strlen_fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'lua_strlen_fix.patch')
-rw-r--r--lua_strlen_fix.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/lua_strlen_fix.patch b/lua_strlen_fix.patch
new file mode 100644
index 000000000000..8b610532f481
--- /dev/null
+++ b/lua_strlen_fix.patch
@@ -0,0 +1,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);