mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 02:18:42 +02:00
* fixed video unit for windows with sizes requiring scrolling
* prevent potential overflow by changing integer to longint git-svn-id: trunk@1552 -
This commit is contained in:
parent
9531293b89
commit
2dcefd968f
@ -79,7 +79,7 @@ end;
|
||||
Procedure AssignVideoBuf (OldCols, OldRows : Word);
|
||||
|
||||
Var NewVideoBuf,NewOldVideoBuf : PVideoBuf;
|
||||
S,I,C,R,NewVideoBufSize : Integer;
|
||||
S,I,C,R,NewVideoBufSize : longint;
|
||||
|
||||
begin
|
||||
S:=SizeOf(TVideoCell);
|
||||
|
@ -414,7 +414,7 @@ begin
|
||||
SysVMD[SysVideoModeCount-1].Col:=dwMaximumWindowSize.X;
|
||||
SysVMD[SysVideoModeCount-1].Row:=dwMaximumWindowSize.Y;
|
||||
SysVMD[SysVideoModeCount-1].Color:=true;
|
||||
OrigScreenSize := dwMaximumWindowSize.X * dwMaximumWindowSize.Y * SizeOf (Char_Info);
|
||||
OrigScreenSize := max(dwMaximumWindowSize.X,dwSize.X) * max(dwMaximumWindowSize.Y,dwSize.Y) * SizeOf (Char_Info);
|
||||
end;
|
||||
GetMem (OrigScreen, OrigScreenSize);
|
||||
with C do
|
||||
|
Loading…
Reference in New Issue
Block a user