Skip to content

Commit

Permalink
Fix lua_putstring()
Browse files Browse the repository at this point in the history
Supported format specification for lua_putstring().

Signed-off-by: Deadcafe Beef <deadcafe.beef@gmail.com>
  • Loading branch information
deadcafe authored and KeithWiles committed Sep 9, 2023
1 parent 2f08d50 commit f080c4a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/lua/lua_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ extern "C" {
char *lua_strtrim(char *str);

static inline void
lua_putstring(const char *s)
lua_putstring(const char *format, ...)
{
fwrite((s), sizeof(char), strlen(s), stdout);
va_list ap;

va_start(ap, format);
vfprintf(stdout, format, ap);
va_end(ap);

fflush(stdout);
}

Expand Down

0 comments on commit f080c4a

Please sign in to comment.