fixed build error for gcc 9

This commit is contained in:
cozis
2022-03-13 21:34:47 +01:00
parent 3a49b82135
commit 66412f65b6
+8 -7
View File
@@ -243,15 +243,16 @@ _Bool Executable_Fetch(Executable *exe, int index, Opcode *opcode, Operand *ops,
switch(type) {
case OPTP_STRING:
{
int data_offset = instr->operands[i].as_int;
int data_offset = instr->operands[i].as_int;
assert(data_offset < exe->headl);
ops[i].type = OPTP_STRING;
ops[i].as_string = exe->head + data_offset;
break;
assert(data_offset < exe->headl);
ops[i].type = OPTP_STRING;
ops[i].as_string = exe->head + data_offset;
break;
}
case OPTP_INT:
ops[i].type = OPTP_INT;
ops[i].as_int = instr->operands[i].as_int;