Canonicalize OV commands to VO form.
Allows us to get rid of some obscure logic that causes an unnecessary word shift. One error message changes in a benign way.
This commit is contained in:
parent
cfa37c83a7
commit
87c6d3fb1e
3 changed files with 12 additions and 3 deletions
11
main.c
11
main.c
|
@ -1134,6 +1134,17 @@ Lclearobj:
|
|||
command.word[0].id = CARRY;
|
||||
command.word[0].type = ACTION;
|
||||
}
|
||||
|
||||
/* From OV to VO form */
|
||||
if (command.word[0].type==OBJECT && command.word[1].type==ACTION) {
|
||||
command_word_t stage;
|
||||
memcpy(&stage, &command.word[0],
|
||||
sizeof(command_word_t));
|
||||
memcpy(&command.word[0], &command.word[1],
|
||||
sizeof(command_word_t));
|
||||
memcpy(&command.word[1], &stage,
|
||||
sizeof(command_word_t));
|
||||
}
|
||||
}
|
||||
|
||||
Lookup:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue