From 6cbd453d52d79aeab6c27a04fe1a8c3741a04bb4 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Fri, 14 Oct 2016 17:51:58 +0000 Subject: [PATCH] kernel: fix for #5350 git-svn-id: svn://kolibrios.org@6593 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 10 ++++------ kernel/trunk/video/vesa20.inc | 8 ++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 3a473a38eb..312f2fa307 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -2944,22 +2944,20 @@ nosb8: ; edx = [top]*65536 + [bottom] mov eax, [_display.width] mov ebx, [_display.height] - dec eax - dec ebx ; check [right] cmp cx, ax - ja .exit + jae .exit ; check [left] ror ecx, 16 cmp cx, ax - ja .exit + jae .exit ; check [bottom] cmp dx, bx - ja .exit + jae .exit ; check [top] ror edx, 16 cmp dx, bx - ja .exit + jae .exit movzx eax, cx ; [left] movzx ebx, dx ; [top] diff --git a/kernel/trunk/video/vesa20.inc b/kernel/trunk/video/vesa20.inc index 4895b93c96..e6cbecd231 100644 --- a/kernel/trunk/video/vesa20.inc +++ b/kernel/trunk/video/vesa20.inc @@ -2147,20 +2147,20 @@ vesa20_drawbackground_stretch: mov eax, [BgrDataWidth] dec eax xor edx, edx - div dword [screen_workarea.right] + div dword [_display.width] push eax ; high xor eax, eax - div dword [screen_workarea.right] + div dword [_display.width] push eax ; low ; the same for height mov eax, [BgrDataHeight] dec eax xor edx, edx - div dword [screen_workarea.bottom] + div dword [_display.height] push eax ; high xor eax, eax - div dword [screen_workarea.bottom] + div dword [_display.height] push eax ; low ; External loop for all y from start to end