aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lstring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstring.c b/lstring.c
index 5788c9e6..c53325d0 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.c,v 2.48 2015/03/25 13:42:19 roberto Exp roberto $ 2** $Id: lstring.c,v 2.49 2015/06/01 16:34:37 roberto Exp roberto $
3** String table (keeps all strings handled by Lua) 3** String table (keeps all strings handled by Lua)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -183,7 +183,7 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
183 return internshrstr(L, str, l); 183 return internshrstr(L, str, l);
184 else { 184 else {
185 TString *ts; 185 TString *ts;
186 if (l + 1 > (MAX_SIZE - sizeof(TString))/sizeof(char)) 186 if (l >= (MAX_SIZE - sizeof(TString))/sizeof(char))
187 luaM_toobig(L); 187 luaM_toobig(L);
188 ts = createstrobj(L, str, l, LUA_TLNGSTR, G(L)->seed); 188 ts = createstrobj(L, str, l, LUA_TLNGSTR, G(L)->seed);
189 ts->u.lnglen = l; 189 ts->u.lnglen = l;