fix(lua): crash in nlua_error

Backport fix hidden in bd4ff0b88, by actually using the `msg` parameter,
rather than trying to print a potentially null `str`.
This commit is contained in:
James McCoy
2023-11-24 16:42:45 -05:00
parent 07860aba75
commit 98fbe3b09a

View File

@@ -135,8 +135,8 @@ static void nlua_error(lua_State *const lstate, const char *const msg)
}
if (in_script) {
os_errmsg(str);
os_errmsg("\n");
fprintf(stderr, msg, (int)len, str);
fprintf(stderr, "\n");
} else {
msg_ext_set_kind("lua_error");
semsg_multiline(msg, (int)len, str);