Selaa lähdekoodia

fixed setting memstream capacity to 0

git-svn-id: trunk@590 -
Vincent Snijders 20 vuotta sitten
vanhempi
commit
a879211175
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      rtl/objpas/classes/streams.inc

+ 1 - 1
rtl/objpas/classes/streams.inc

@@ -600,7 +600,7 @@ begin
   else
     begin
       Result:=Reallocmem(FMemory,Newcapacity);
-      If Result=Nil then
+      If (Result=Nil) and (Newcapacity>0) then
         Raise EStreamError.Create(SMemoryStreamError);
     end;
 end;