sprintf to snprintf (deprecated MacOSX15.0) (#198)

This commit is contained in:
maloglolo
2024-12-31 12:48:27 +01:00
committed by GitHub
parent 0025e5d81b
commit 41c940e680

View File

@@ -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);
}
}