Fix NEW instruction args in ain v8 and below

NEW was changed in ain v11 to accept 2 arguments.
This commit is contained in:
Nunuhara Cabbage
2020-02-14 22:16:20 -08:00
parent 608aedb500
commit 4429bd0990
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -711,6 +711,7 @@ static bool read_tag(struct ain_reader *r, struct ain *ain)
ain->version = read_int32(r);
if (ain->version >= 11) {
instructions[CALLHLL].nr_args = 3;
instructions[NEW].nr_args = 2;
instructions[S_MOD].nr_args = 1;
instructions[OBJSWAP].nr_args = 1;
instructions[DG_STR_TO_METHOD].nr_args = 1;
+1 -1
View File
@@ -230,7 +230,7 @@ struct instruction instructions[NR_OPCODES] = {
OP ( S_GTE, 0 ),
OP ( S_LENGTH2, 0 ),
TODO ( S_LENGTHBYTE2, 0 ),
TODO ( NEW, 2, T_STRUCT, T_INT ), // FIXME: 2nd arg is T_FUNC *OR* -1
TODO ( NEW, 0, T_STRUCT, T_INT ), // FIXME: 2nd arg is T_FUNC *OR* -1
OP ( DELETE, 0 ),
TODO ( CHECKUDO, 0 ),
OP ( A_REF, 0 ),