mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-26 00:26:52 +03:00
bugfix in sysfn 67: avoid system crash for invalid parameter
git-svn-id: svn://kolibrios.org@856 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
06eb2f3614
commit
a881989d7c
@ -562,10 +562,10 @@ check_window_position:
|
||||
|
||||
pushad ; window inside screen ?
|
||||
|
||||
movsx eax,word [edi+WDATA.box.left]
|
||||
movsx ebx,word [edi+WDATA.box.top]
|
||||
movsx ecx,word [edi+WDATA.box.width]
|
||||
movsx edx,word [edi+WDATA.box.height]
|
||||
mov eax, [edi+WDATA.box.left]
|
||||
mov ebx, [edi+WDATA.box.top]
|
||||
mov ecx, [edi+WDATA.box.width]
|
||||
mov edx, [edi+WDATA.box.height]
|
||||
|
||||
cmp ecx,[Screen_Max_X] ; check x size
|
||||
jbe x_size_ok
|
||||
|
@ -3018,12 +3018,14 @@ sys_set_window:
|
||||
add eax,100
|
||||
mov [new_window_starting],eax
|
||||
|
||||
mov word[edi+WDATA.box.width],bx
|
||||
mov word[edi+WDATA.box.height],cx
|
||||
movsx eax,bx
|
||||
mov [edi+WDATA.box.width],eax
|
||||
movsx eax,cx
|
||||
mov [edi+WDATA.box.height],eax
|
||||
sar ebx,16
|
||||
sar ecx,16
|
||||
mov word[edi+WDATA.box.left],bx
|
||||
mov word[edi+WDATA.box.top],cx
|
||||
mov [edi+WDATA.box.left],ebx
|
||||
mov [edi+WDATA.box.top],ecx
|
||||
|
||||
call check_window_position
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user