From 64a442a887ab9a95c0d2bd38d404a43b1466414b Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Tue, 29 Sep 2015 23:07:33 +0300 Subject: [PATCH] Fix error message The error is using hhu and u and other unsupported format characters. See http://www.lua.org/manual/5.2/manual.html#lua_pushfstring for more --- LuaEngine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LuaEngine.cpp b/LuaEngine.cpp index 656981a..163e168 100644 --- a/LuaEngine.cpp +++ b/LuaEngine.cpp @@ -1192,7 +1192,9 @@ int Eluna::Register(lua_State* L, uint8 regtype, uint32 entry, uint64 guid, uint break; } luaL_unref(L, LUA_REGISTRYINDEX, functionRef); - luaL_error(L, "Unknown event type (regtype %hhu, event %u, entry %u, guid " UI64FMTD ", instance %u)", regtype, event_id, entry, guid, instanceId); + std::ostringstream oss; + oss << "regtype " << regtype << ", event " << event_id << ", entry " << entry << ", guid " << guid << ", instance " << instanceId; + luaL_error(L, "Unknown event type (%s)", oss.str().c_str()); return 0; }