From 41c940e680493492157b6d082bd4ebb7a258b0f8 Mon Sep 17 00:00:00 2001 From: maloglolo <157951405+maloglolo@users.noreply.github.com> Date: Tue, 31 Dec 2024 12:48:27 +0100 Subject: [PATCH] sprintf to snprintf (deprecated MacOSX15.0) (#198) --- src/LuaEngine/ElunaQueryMethods.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LuaEngine/ElunaQueryMethods.h b/src/LuaEngine/ElunaQueryMethods.h index 17da0ee0e6..3780184b22 100644 --- a/src/LuaEngine/ElunaQueryMethods.h +++ b/src/LuaEngine/ElunaQueryMethods.h @@ -29,7 +29,7 @@ namespace LuaQuery if (field >= count) { char arr[256]; - sprintf(arr, "trying to access invalid field index %u. There are %u fields available and the indexes start from 0", field, count); + snprintf(arr, sizeof(arr), "trying to access invalid field index %u. There are %u fields available and the indexes start from 0", field, count); luaL_argerror(L, 2, arr); } }