Fix bug pertaining to rawgeti not supporting int64
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "streambuffer.hpp"
|
||||
#include "table.hpp"
|
||||
#include "world.hpp"
|
||||
#include <iostream>
|
||||
|
||||
// Given a table and an tnmap, return the table number of the table.
|
||||
// Returns zero if the table doesn't have a table number.
|
||||
@@ -179,6 +180,8 @@ static bool diff_tables(LuaStack &SLS0, LuaSlot stnmap, LuaSlot stab,
|
||||
LuaVar skey, mkey, sval, mval, mnil;
|
||||
LuaStack SLS(SLS0.state(), skey, sval);
|
||||
LuaStack MLS(MLS0.state(), mkey, mval, mnil);
|
||||
assert(MLS.istable(mtab));
|
||||
assert(SLS.istable(stab));
|
||||
MLS.set(mnil, LuaNil);
|
||||
int nupdates = 0;
|
||||
|
||||
@@ -399,8 +402,10 @@ void World::diff_tangible_databases(const IdVector &basis, lua_State *master, St
|
||||
int s_top = lua_gettop(synch);
|
||||
int m_top = lua_gettop(master);
|
||||
for (int64_t id : basis) {
|
||||
MLS.rawgeti(mtab, mtangibles, id);
|
||||
SLS.rawgeti(stab, stangibles, id);
|
||||
MLS.rawget(mtab, mtangibles, id);
|
||||
SLS.rawget(stab, stangibles, id);
|
||||
assert(MLS.istable(mtab));
|
||||
assert(SLS.istable(stab));
|
||||
int tw = sb->total_writes();
|
||||
sb->write_int64(id);
|
||||
nmodified += 1;
|
||||
|
||||
Reference in New Issue
Block a user