diff options
| author | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-08-08 14:02:33 +0000 |
|---|---|---|
| committer | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-08-08 14:02:33 +0000 |
| commit | 72ca270fa71f11423d122d9e170b29f672e66505 (patch) | |
| tree | 6cc0d6daf2a988dac60a200b291f9a6cde45ed14 /packages/graph/src | |
| parent | 3d76e8ca5f979906800398dcd4779fb3e101fc5a (diff) | |
| download | fpc-72ca270fa71f11423d122d9e170b29f672e66505.tar.gz | |
* patch from Nicolay for VLineVESA256 off-by-one error in calculation of BankRest, Mantis 17131
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15746 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/graph/src')
| -rw-r--r-- | packages/graph/src/go32v2/vesa.inc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/graph/src/go32v2/vesa.inc b/packages/graph/src/go32v2/vesa.inc index 4283bf4050..185382175d 100644 --- a/packages/graph/src/go32v2/vesa.inc +++ b/packages/graph/src/go32v2/vesa.inc @@ -925,10 +925,10 @@ end; {$ifdef logging2} LogLn('set bank '+strf(curbank)+' for offset '+hexstr(offs,8)); {$endif logging} - If (VLength-1)*bytesperline <= ($10000-(Offs and $ffff)) Then + If (VLength-1)*bytesperline <= ($ffff-(Offs and $ffff)) Then bankrest := VLength else {the rest won't fit anymore in the current window } - bankrest := (($10000 - (Offs and $ffff)) div bytesperline)+1; + bankrest := (($ffff - (Offs and $ffff)) div bytesperline)+1; {$ifdef logging2} LogLn('Rest to be drawn in this window: '+strf(bankrest)); {$endif logging} @@ -953,10 +953,10 @@ end; {$ifdef logging2} LogLn('set bank '+strf(curbank)+' for offset '+hexstr(offs,8)); {$endif logging} - If (VLength-1)*bytesperline <= ($10000-(Offs and $ffff)) Then + If (VLength-1)*bytesperline <= ($ffff-(Offs and $ffff)) Then bankrest := VLength else {the rest won't fit anymore in the current window } - bankrest := (($10000 - (Offs and $ffff)) div bytesperline)+1; + bankrest := (($ffff - (Offs and $ffff)) div bytesperline)+1; {$ifdef logging2} LogLn('Rest to be drawn in this window: '+strf(bankrest)); {$endif logging} @@ -981,10 +981,10 @@ end; {$ifdef logging2} LogLn('set bank '+strf(curbank)+' for offset '+hexstr(offs,8)); {$endif logging} - If (VLength-1)*bytesperline <= ($10000-(Offs and $ffff)) Then + If (VLength-1)*bytesperline <= ($ffff-(Offs and $ffff)) Then bankrest := VLength else {the rest won't fit anymore in the current window } - bankrest := (($10000 - (Offs and $ffff)) div bytesperline)+1; + bankrest := (($ffff - (Offs and $ffff)) div bytesperline)+1; {$ifdef logging2} LogLn('Rest to be drawn in this window: '+strf(bankrest)); {$endif logging} @@ -1010,10 +1010,10 @@ end; {$ifdef logging2} LogLn('set bank '+strf(curbank)+' for offset '+hexstr(offs,8)); {$endif logging} - If (VLength-1)*bytesperline <= ($10000-(Offs and $ffff)) Then + If (VLength-1)*bytesperline <= ($ffff-(Offs and $ffff)) Then bankrest := VLength else {the rest won't fit anymore in the current window } - bankrest := (($10000 - (Offs and $ffff)) div bytesperline)+1; + bankrest := (($ffff - (Offs and $ffff)) div bytesperline)+1; {$ifdef logging2} LogLn('Rest to be drawn in this window: '+strf(bankrest)); {$endif logging} |
