Browse Source

* crtwrite didn't handle buffer writes > 255 chars properly, and the textrec buffer is 256 currently (and has been since svn history start). Mantis #22334

git-svn-id: trunk@21738 -
marco 13 years ago
parent
commit
1a3d8f483e
1 changed files with 8 additions and 1 deletions
  1. 8 1
      rtl/win/crt.pp

+ 8 - 1
rtl/win/crt.pp

@@ -711,7 +711,14 @@ begin
         WriteChar(f.buffer[i]);
         WriteChar(f.buffer[i]);
       end
       end
     else
     else
-      s:=s+f.buffer[i];
+      begin
+        if length(s)=255 then
+          begin
+            WriteStr(s);
+            s:='';
+          end;
+        s:=s+f.buffer[i];
+      end;
   if s<>'' then
   if s<>'' then
     WriteStr(s);
     WriteStr(s);
   SetScreenCursor(CurrX, CurrY);
   SetScreenCursor(CurrX, CurrY);