Skip to content

Commit

Permalink
Use lua_pushfstring
Browse files Browse the repository at this point in the history
  • Loading branch information
raphink committed Mar 29, 2016
1 parent 9fd880a commit c52da10
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/auglua.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ static void lua_checkargs(lua_State *L, const char *name, int arity) {
int n = lua_gettop(L);
char msg[1024];
if (n != arity) {
snprintf(msg, sizeof(msg), "Wrong number of arguments for '%s'", name);
lua_pushstring(L, msg);
lua_pushfstring(L, msg, sizeof(msg), "Wrong number of arguments for '%s'", name);
lua_error(L);
}
}
Expand Down

0 comments on commit c52da10

Please sign in to comment.