mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-29 04:03:09 +03:00
kernel: Fix memory corruption of clipboard data.
There were a few off-by-one errors in window size calculation. As a result, winmap update code corrupted clipboard structures. git-svn-id: svn://kolibrios.org@8928 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6f2937256a
commit
807afdadb8
@ -371,6 +371,7 @@ mouse._.move_handler:
|
||||
cmp eax, [_display.width]
|
||||
jl @f
|
||||
sub eax, [_display.width]
|
||||
inc eax
|
||||
sub [mouse.active_sys_window.new_box.left], eax
|
||||
@@:
|
||||
mov eax, [mouse.active_sys_window.new_box.top]
|
||||
@ -383,6 +384,7 @@ mouse._.move_handler:
|
||||
cmp eax, [_display.height]
|
||||
jl .call_window_handler
|
||||
sub eax, [_display.height]
|
||||
inc eax
|
||||
sub [mouse.active_sys_window.new_box.top], eax
|
||||
jmp .call_window_handler
|
||||
|
||||
|
@ -1686,7 +1686,8 @@ align 4
|
||||
align 4
|
||||
.fix_width_high:
|
||||
mov ecx, esi
|
||||
mov [edi + WDATA.box.width], esi
|
||||
dec ecx
|
||||
mov [edi + WDATA.box.width], ecx
|
||||
jmp .check_left
|
||||
;--------------------------------------
|
||||
align 4
|
||||
@ -1699,13 +1700,15 @@ align 4
|
||||
.fix_left_high:
|
||||
mov eax, esi
|
||||
sub eax, ecx
|
||||
dec eax
|
||||
mov [edi + WDATA.box.left], eax
|
||||
jmp .check_height
|
||||
;--------------------------------------
|
||||
align 4
|
||||
.fix_height_high:
|
||||
mov edx, esi
|
||||
mov [edi + WDATA.box.height], esi
|
||||
dec edx
|
||||
mov [edi + WDATA.box.height], edx
|
||||
jmp .check_top
|
||||
;--------------------------------------
|
||||
align 4
|
||||
@ -1718,6 +1721,7 @@ align 4
|
||||
.fix_top_high:
|
||||
mov ebx, esi
|
||||
sub ebx, edx
|
||||
dec ebx
|
||||
mov [edi + WDATA.box.top], ebx
|
||||
jmp .exit
|
||||
;------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user