Skip to content

Commit fdcc206

Browse files
committed
Use lua_pushfstring
1 parent 17333ff commit fdcc206

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/auglua.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ static void lua_checkargs(lua_State *L, const char *name, int arity) {
4242
int n = lua_gettop(L);
4343
char msg[1024];
4444
if (n != arity) {
45-
snprintf(msg, sizeof(msg), "Wrong number of arguments for '%s'", name);
46-
lua_pushstring(L, msg);
45+
lua_pushfstring(L, msg, sizeof(msg), "Wrong number of arguments for '%s'", name);
4746
lua_error(L);
4847
}
4948
}

0 commit comments

Comments
 (0)