# HG changeset patch # User Laurens Holst # Date 1412706965 -7200 # Tue Oct 07 20:36:05 2014 +0200 # Node ID 7f811b8b6ad443f5c9ad51be39bed105267f2bf3 # Parent 18443798b785440425db9f99d6b3864e6b474232 PatchEditor: Fix SetInputValue on modules with output ports. It neglected to deduct the output count from the port number. diff --git a/src/ui/PatchEditor.asm b/src/ui/PatchEditor.asm --- a/src/ui/PatchEditor.asm +++ b/src/ui/PatchEditor.asm @@ -432,7 +432,19 @@ 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