Commit d66473ae authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Fix broken LFS loading in Lua 5.3.

Do not [lua_]assert() on things which have a side effect...
parent 185855b6
......@@ -579,9 +579,10 @@ static void LoadAllProtos (LoadState *S) {
S->pv[i] = LoadFunction(S, luaF_newproto(L), NULL);
}
/* 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));
for (i = 0; i < n; i++) {
for (i = 0; i < nk - 1; i++) { // -1 to ignore timestamp
lu_byte tt_data = LoadByte(S);
TString *Tname = LoadString2(S, tt_data);
const char *name = getstr(Tname) + OFFSET_TSTRING;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment