summaryrefslogtreecommitdiff
path: root/lib/lua/src/llex.c
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2018-05-30 16:30:44 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2018-05-30 16:30:44 +0200
commitddd03c38a418c9f2ed204bf4fa68fd1d5feac11f (patch)
tree37b5d8f02fe8f1de111a9d67b4c128edc9d656c5 /lib/lua/src/llex.c
parente3e98f935687ba60512889a5ddc62010216aa331 (diff)
downloadminetest-ddd03c38a418c9f2ed204bf4fa68fd1d5feac11f.tar.gz
minetest-ddd03c38a418c9f2ed204bf4fa68fd1d5feac11f.tar.bz2
minetest-ddd03c38a418c9f2ed204bf4fa68fd1d5feac11f.zip
Update embedded Lua to 5.1.5 (#7387)
Diffstat (limited to 'lib/lua/src/llex.c')
-rw-r--r--lib/lua/src/llex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/lua/src/llex.c b/lib/lua/src/llex.c
index 98068c1aa..d1b179670 100644
--- a/lib/lua/src/llex.c
+++ b/lib/lua/src/llex.c
@@ -1,5 +1,5 @@
/*
-** $Id: llex.c,v 2.20.1.1 2007/12/27 13:02:25 roberto Exp $
+** $Id: llex.c,v 2.20.1.2 2009/11/23 14:58:22 roberto Exp $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -118,8 +118,10 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
lua_State *L = ls->L;
TString *ts = luaS_newlstr(L, str, l);
TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */
- if (ttisnil(o))
+ if (ttisnil(o)) {
setbvalue(o, 1); /* make sure `str' will not be collected */
+ luaC_checkGC(L);
+ }
return ts;
}