PatchEditor: Fix SetInputValue on modules with output ports.

It neglected to deduct the output count from the port number.
1 files changed, 12 insertions(+), 0 deletions(-)

M src/ui/PatchEditor.asm
M src/ui/PatchEditor.asm +12 -0
@@ 432,7 432,19 @@ PatchEditor_SetInputValue:
 	call c,System_ThrowException  ; only works on inputs
 	call PatchEditor_GetPatch
 	pop hl
+	push hl
+	push ix
+	ld a,0
+	ld b,0
+	ld c,h
+	call Patch_GetModuleType
+	ld a,(ix + ModuleType.outputCount)
+	pop ix
+	pop hl
 	pop de
+	neg
+	add a,l
+	ld l,a
 	call Patch_AddLink
 	pop ix
 	ret