Linux CRT issue?
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
I have a basic program setup as a shell that writes to the screen using CRT. When I telnet into the program with certain telnet clients, it sends linefeeds over and over in a loop.
I tracked it down to the GetConsoleBuf procedure in crt.pp. For some reason the ScreenHeight and ScreenWidth variables get set to 0 when this happens. I added two lines to default the screen size just before the buffer is allocated and it fixes the problem:
If ScreenWidth = 0 Then ScreenWidth := 80;
If ScreenHeight = 0 Then ScreenHeight := 25;
Maybe the API call that gets the screen size returns 0 when setup as a shell? Not sure but could these lines be added into crt.pp in the future to prevent this problem?
Additional information:
Reporter: james
EMail: ccoyle at ptd dot net
Mantis conversion info:
- Mantis ID: 4760
- OS: Linux
- Version: 1.0.10
- Fixed in version: 1.9.1