Checks for type 'int' added to binary header
The structure 'AbsLineInfo' is hard-dumped into binary chunks, and it comprises two 'int' fields.
This commit is contained in:
13
ldump.c
13
ldump.c
@@ -253,16 +253,19 @@ static void dumpFunction (DumpState *D, const Proto *f) {
|
||||
}
|
||||
|
||||
|
||||
#define dumpNumInfo(D, tvar, value) \
|
||||
{ tvar i = value; dumpByte(D, sizeof(tvar)); dumpVar(D, i); }
|
||||
|
||||
|
||||
static void dumpHeader (DumpState *D) {
|
||||
dumpLiteral(D, LUA_SIGNATURE);
|
||||
dumpByte(D, LUAC_VERSION);
|
||||
dumpByte(D, LUAC_FORMAT);
|
||||
dumpLiteral(D, LUAC_DATA);
|
||||
dumpByte(D, sizeof(Instruction));
|
||||
dumpByte(D, sizeof(lua_Integer));
|
||||
dumpByte(D, sizeof(lua_Number));
|
||||
dumpInteger(D, LUAC_INT);
|
||||
dumpNumber(D, LUAC_NUM);
|
||||
dumpNumInfo(D, int, LUAC_INT);
|
||||
dumpNumInfo(D, Instruction, LUAC_INST);
|
||||
dumpNumInfo(D, lua_Integer, LUAC_INT);
|
||||
dumpNumInfo(D, lua_Number, LUAC_NUM);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user