Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2003-02

ClrScr bug in crt unit (win32 1.0.7 )

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

pascalive

I noticed that the crt.ClrScr (win32) in 1.0.7 is buggy. Take a look at the following program:

uses crt;
var    i,j: integer;
begin
    for i :=1 to 25 do
       begin
       window(1,1,80,25);
       textattr:=7;
       clrScr;
       window(1,1,i,i);
       textAttr:=31;
       clrScr;
       for j := 1 to i do
         begin
         gotoxy(1,j);
         write(i);
         gotoxy(j,1);
         write(i);
         end;
       readkey;
       end;
     ClrScr;
     readkey;
end.

The problem occur when the height of the window is 3, 4, 5, 6 or 8.
I'm sending a patch that resolves this bug
I hope it can be useful.

BTW the win32 crt unit of the main branch is quite outdated.

Karl Brandt

__________________________________________________________________________ E-mail Premium BOL
Antivírus, anti-spam e até 100 MB de espaço. Assine já! http://email.bol.com.br/

Reply by email