kernel: fix for #5350

git-svn-id: svn://kolibrios.org@6593 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2016-10-14 17:51:58 +00:00
parent cd5d633704
commit 6cbd453d52
2 changed files with 8 additions and 10 deletions

View File

@ -2944,22 +2944,20 @@ nosb8:
; edx = [top]*65536 + [bottom] ; edx = [top]*65536 + [bottom]
mov eax, [_display.width] mov eax, [_display.width]
mov ebx, [_display.height] mov ebx, [_display.height]
dec eax
dec ebx
; check [right] ; check [right]
cmp cx, ax cmp cx, ax
ja .exit jae .exit
; check [left] ; check [left]
ror ecx, 16 ror ecx, 16
cmp cx, ax cmp cx, ax
ja .exit jae .exit
; check [bottom] ; check [bottom]
cmp dx, bx cmp dx, bx
ja .exit jae .exit
; check [top] ; check [top]
ror edx, 16 ror edx, 16
cmp dx, bx cmp dx, bx
ja .exit jae .exit
movzx eax, cx ; [left] movzx eax, cx ; [left]
movzx ebx, dx ; [top] movzx ebx, dx ; [top]

View File

@ -2147,20 +2147,20 @@ vesa20_drawbackground_stretch:
mov eax, [BgrDataWidth] mov eax, [BgrDataWidth]
dec eax dec eax
xor edx, edx xor edx, edx
div dword [screen_workarea.right] div dword [_display.width]
push eax ; high push eax ; high
xor eax, eax xor eax, eax
div dword [screen_workarea.right] div dword [_display.width]
push eax ; low push eax ; low
; the same for height ; the same for height
mov eax, [BgrDataHeight] mov eax, [BgrDataHeight]
dec eax dec eax
xor edx, edx xor edx, edx
div dword [screen_workarea.bottom] div dword [_display.height]
push eax ; high push eax ; high
xor eax, eax xor eax, eax
div dword [screen_workarea.bottom] div dword [_display.height]
push eax ; low push eax ; low
; External loop for all y from start to end ; External loop for all y from start to end