From 947a8c1a4da105a25b131758dbbf9e40c6d3dcb3 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 3 Mar 2024 13:02:21 -0500 Subject: Fixed error with allocating buffer. --- src/lpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lpm.c b/src/lpm.c index 478897b..f9b8d58 100644 --- a/src/lpm.c +++ b/src/lpm.c @@ -94,7 +94,7 @@ static const int luaL_win32_error(lua_State* L, DWORD error_id, const char* mess lua_pushvfstring(L, message, va); va_end(va); wchar_t message_buffer[2048]; - size_t size = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + size_t size = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error_id, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), message_buffer, 2048, NULL); lua_pushliteral(L, ": "); lua_toutf8(L, message_buffer); -- cgit v1.2.3