Ver código fonte

* 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 anos atrás
pai
commit
1a3d8f483e
1 arquivos alterados com 8 adições e 1 exclusões
  1. 8 1
      rtl/win/crt.pp

+ 8 - 1
rtl/win/crt.pp

@@ -711,7 +711,14 @@ begin
         WriteChar(f.buffer[i]);
       end
     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
     WriteStr(s);
   SetScreenCursor(CurrX, CurrY);