diff options
Diffstat (limited to 'src/3rdParty/lua/lvm.c')
-rw-r--r-- | src/3rdParty/lua/lvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/3rdParty/lua/lvm.c b/src/3rdParty/lua/lvm.c index 4d71cff..fcd24e1 100644 --- a/src/3rdParty/lua/lvm.c +++ b/src/3rdParty/lua/lvm.c | |||
@@ -92,7 +92,7 @@ static int l_strton (const TValue *obj, TValue *result) { | |||
92 | if (!cvt2num(obj)) /* is object not a string? */ | 92 | if (!cvt2num(obj)) /* is object not a string? */ |
93 | return 0; | 93 | return 0; |
94 | else { | 94 | else { |
95 | TString *st = tsvalue(obj); | 95 | TString *st = tsvalue(obj); |
96 | return (luaO_str2num(getstr(st), result) == tsslen(st) + 1); | 96 | return (luaO_str2num(getstr(st), result) == tsslen(st) + 1); |
97 | } | 97 | } |
98 | } | 98 | } |
@@ -661,7 +661,7 @@ void luaV_concat (lua_State *L, int total) { | |||
661 | /* collect total length and number of strings */ | 661 | /* collect total length and number of strings */ |
662 | for (n = 1; n < total && tostring(L, s2v(top - n - 1)); n++) { | 662 | for (n = 1; n < total && tostring(L, s2v(top - n - 1)); n++) { |
663 | size_t l = tsslen(tsvalue(s2v(top - n - 1))); | 663 | size_t l = tsslen(tsvalue(s2v(top - n - 1))); |
664 | if (l_unlikely(l >= (MAX_SIZE/sizeof(char)) - tl)) { | 664 | if (l_unlikely(l >= MAX_SIZE - sizeof(TString) - tl)) { |
665 | L->top.p = top - total; /* pop strings to avoid wasting stack */ | 665 | L->top.p = top - total; /* pop strings to avoid wasting stack */ |
666 | luaG_runerror(L, "string length overflow"); | 666 | luaG_runerror(L, "string length overflow"); |
667 | } | 667 | } |