Commit 3f8f8581 authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL
Browse files

[509] Fix abort autoscrolling off a window with no icons

When looking up the user icon button type passed in R3/R4, use the window handle
in R3 rather than 'handle' which is the window in which autoscrolling started.
This caused an abort if that window contained no icons (because w_icons = -1, and
R4 != -1 leading to R5 = 15 and invariably an address in zero page somewhere).
parent 13316dc0
......@@ -1998,8 +1998,9 @@ cantchange
; obtain 'button type' of user icon
;
01 CMP R4,#nullptr
LDREQ R5,[handle,#w_workflags]; look up work area button type
LDRNE R5,[handle,#w_icons]
Abs R14,R3
LDREQ R5,[R14,#w_workflags] ; look up work area button type
LDRNE R5,[R14,#w_icons]
ADDNE R5,R5,#i_flags
LDRNE R5,[R5,R4,ASL #i_shift] ; R5 = flag word
;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment