Disasembler doesn't include object index for index 0 for dot notation.
Describe the bug
For dot notation (https://manual.gamemaker.io/monthly/en/GameMaker_Language/GML_Overview/Addressing_Variables_In_Other_Instances.htm), using the first game object results in no asset index in the disassembly.
For example, take if (obj_choicer_old.choiced == false). This incorrectly disassembles to:
push.v choiced
pushi.e 0
cmp.i.v EQ
This is because obj_choicer_old is the first Game Object in SURVEY_PROGRAM's Game Object list.
If it was instead the fourth game object, it would correctly disassemble to:
push.v 3.choiced
pushi.e 0
cmp.i.v EQ
I'm not sure if this affects pop opcodes too, but it probably does. I've got no proof of that though, so I'll leave this issue just for push.
Reproducing steps
- Open data.win of SURVEY_PROGRAM
- Go to
gml_Object_obj_schoollobbycutscene_Step_0 - Go to Disassembly tab
- Search for
choiced - Will find
push.v choicedinstead of expectedpush.v 0.choiced
Setup Details
- UTMT Version: 7.0.0.0, also affects 6.x.x.x and 5.x.x.x, and probably all other versions too.
- OS: Windows 10
- Game: All games, anything where the first Game Object is used in dot notation. Can test using SURVEY_PROGRAM
Do you try to retry that with lasted version of UTMT?
~~probably not a disassembler issue, instead most likely either UTMT's or GM's compiler being weird~~ nvm
No, this is technically a disassembler issue. (But a very minor/low priority one that we can address if/when we change other assembly syntax.)