diff --git a/s/CnPCaret b/s/CnPCaret index 3db69e2ec89cffb160adc360e79e144e4bd08c11..05f999ecdec94fc79c08fb422972e75a6130e666 100644 --- a/s/CnPCaret +++ b/s/CnPCaret @@ -29,7 +29,6 @@ int_set_caret_position ROUT Push "R0-R6,R11,R14" - [ CnP ; if we're called with R5=-1 then R4,R5 are calculated from R0-R3 ; however, R4 is undefined on entry so could be anything. ; Internally we'd like to be able to use the call to put a ghost caret @@ -44,7 +43,6 @@ int_set_caret_position ROUT 00 CMP R5,#-2 MOVEQ R5,#-1 - ] ; validate existing caret blocks LDR handle,caretdata @@ -98,7 +96,8 @@ int_set_caret_position ROUT BL iconautoscroll_stop Pull "R0,x0,y0,x1,y1" 00 - CMP R0,#-1 + AcceptLoosePointer_NegOrZero R0,nullptr + CMP R0,R0,ASR #31 BEQ %FT07 ; we know this one's not valid MOV handle,R0 BL checkhandle ; valid window handle? @@ -109,7 +108,7 @@ int_set_caret_position ROUT LDR R14,taskidentifier1 ; 'TASK' CMP R2,R14 ; is R2 'TASK' MOVNE R4,#0 ; if we're called with TASK then R4 has correct flags. If not, we need - ; to make sure we have some valid flags + ; to make sure we have some valid flags MOVEQ R2,#0 ; if we were called with R2='TASK' then STREQ R2,[sp,#(2+1+8)*4] ; ensure R2=0 on return - taskhandle stacked below r2 08