diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-06-18 11:20:32 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-06-18 11:20:32 -0300 |
commit | a5cbb7c3a7b26d962fd85ff50dc7e0cea84d93af (patch) | |
tree | 135ab1766e319539332a8529c832409b15d6ed81 /lstring.c | |
parent | dcad08b76d3d251c0beff4e7c692035c11641509 (diff) | |
download | lua-a5cbb7c3a7b26d962fd85ff50dc7e0cea84d93af.tar.gz lua-a5cbb7c3a7b26d962fd85ff50dc7e0cea84d93af.tar.bz2 lua-a5cbb7c3a7b26d962fd85ff50dc7e0cea84d93af.zip |
detail (i + 1 > exp is simply i >= exp)
Diffstat (limited to 'lstring.c')
-rw-r--r-- | lstring.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |