Skip to content

Commit

Permalink
Fix txtToken returning '' for TK_NAME & TK_STRING
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Nov 23, 2022
1 parent 5890777 commit 47116b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/llex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const char* luaX_reserved2str (int token) {
static const char *txtToken (LexState *ls, int token) {
switch (token) {
case TK_NAME: case TK_STRING:
return luaO_pushfstring(ls->L, "'%s'", ls->t.seminfo.ts->contents);
case TK_FLT: case TK_INT:
save(ls, '\0');
return luaO_pushfstring(ls->L, "'%s'", luaZ_buffer(ls->buff));
Expand Down

0 comments on commit 47116b6

Please sign in to comment.