[Workshop] Editor crashes if there are unassigned subroutine indices


	0: fill_array
	1: extract_bits
	26: vm_decode_OPCD
	27: vm_decode_rA
	28: vm_decode_rB
	29: vm_decode_Rc
	30: vm_decode_rD
	31: vm_decode_rS
	33: vm_decode_SIMM
	40: vm_execute_instruction
	41: vm_illegal_instruction
	42: vm_unimplemented_instruction
	51: vm_op_addi
	54: vm_op_sc
	96: as_u32
	97: vm_step
	99: sext16
	103: vm_unimplemented_syscall
	104: vm_syscall_abort
	105: vm_run
	106: add_word
	107: sub_word

Attempting to paste the script this is from and opening the editor will crash the game. Deleting a subroutine and reopening the editor without assigning another to that index will also crash the game.

I originally triggered the bug by deleting a subroutine, but after trying to fix it by copying my settings and editing them manually, I also noticed that the names of variables and subroutines that weren’t referenced weren’t saved to the clipboard.

Thanks for the report! Do you happen to have any additional details on what exact steps you took to reproduce the crash? I tried to reproduce by pasting in subroutines in various indices and I couldn’t hit it yet. I’m still looking, but any additional info/example scripts would be greatly appreciated!


Nevermind! I actually tracked this down. Keep an eye out for a fix in a future update. Thanks again for the report!