Browse Source

* support writing more than 1024 zeros in tobjectwriter.writezeros

git-svn-id: trunk@31379 -
nickysn 10 years ago
parent
commit
368ba47d6e
1 changed files with 11 additions and 2 deletions
  1. 11 2
      compiler/owbase.pas

+ 11 - 2
compiler/owbase.pas

@@ -203,8 +203,17 @@ var
   empty : array[0..1023] of byte;
 begin
   if l>sizeof(empty) then
-    internalerror(200404081);
-  if l>0 then
+    begin
+      fillchar(empty,sizeof(empty),0);
+      while l>sizeof(empty) do
+        begin
+          Write(empty,sizeof(empty));
+          Dec(l,sizeof(empty));
+        end;
+      if l>0 then
+        Write(empty,l);
+    end
+  else if l>0 then
     begin
       fillchar(empty,l,0);
       Write(empty,l);