From 0c25f85c9f93269e7cf68ad5b5d4bfbc3d075c32 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 25 Mar 2020 11:19:20 +0100 Subject: [PATCH] empty string. --- client/scripting.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/scripting.c b/client/scripting.c index 7ba38ee8b..756799626 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -790,6 +790,7 @@ static int l_reveng_runmodel(lua_State *L) { // l = little endian input and output, L = little endian output only, t = left justified} //result = calculated crc hex string char result[50]; + memset(result, 0x00, sizeof(result)); const char *inModel = luaL_checkstring(L, 1); const char *inHexStr = luaL_checkstring(L, 2); @@ -800,7 +801,7 @@ static int l_reveng_runmodel(lua_State *L) { if (!ans) return returnToLuaWithError(L, "Reveng failed"); - lua_pushstring(L, (const char *)result); + lua_pushstring(L, result); return 1; }