Fix broken LFS loading in Lua 5.3.
Do not [lua_]assert() on things which have a side effect...
This commit is contained in:
parent
185855b69a
commit
d66473aeeb
|
@ -579,9 +579,10 @@ static void LoadAllProtos (LoadState *S) {
|
||||||
S->pv[i] = LoadFunction(S, luaF_newproto(L), NULL);
|
S->pv[i] = LoadFunction(S, luaF_newproto(L), NULL);
|
||||||
}
|
}
|
||||||
/* generate the ROTable entries from first N constants; the last is a timestamp */
|
/* generate the ROTable entries from first N constants; the last is a timestamp */
|
||||||
lua_assert(n+1 == LoadInt(S));
|
int nk = LoadInt(S);
|
||||||
|
lua_assert(n+1 == nk);
|
||||||
ROTable_entry *entry_list = cast(ROTable_entry *, StoreGetPos(S));
|
ROTable_entry *entry_list = cast(ROTable_entry *, StoreGetPos(S));
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < nk - 1; i++) { // -1 to ignore timestamp
|
||||||
lu_byte tt_data = LoadByte(S);
|
lu_byte tt_data = LoadByte(S);
|
||||||
TString *Tname = LoadString2(S, tt_data);
|
TString *Tname = LoadString2(S, tt_data);
|
||||||
const char *name = getstr(Tname) + OFFSET_TSTRING;
|
const char *name = getstr(Tname) + OFFSET_TSTRING;
|
||||||
|
|
Loading…
Reference in New Issue