Skip to content

Commit

Permalink
sprintf to snprintf (deprecated MacOSX15.0) (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
maloglolo authored Dec 31, 2024
1 parent 0025e5d commit 41c940e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LuaEngine/ElunaQueryMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 41c940e

Please sign in to comment.