2
0
Эх сурвалжийг харах

Fixed CacheMem bug when replacing initial position of buffer

Pascal Coin 4 жил өмнө
parent
commit
72aaa486ee

+ 4 - 0
src/libraries/abstractmem/UCacheMem.pas

@@ -549,6 +549,8 @@ begin
       {$ENDIF}
       Exit;
     end;
+  end else if Not Assigned(PCurrent) then begin
+    PCurrent := FCacheData.FindLowest;
   end;
 
   // Will need to create a new "linar struct" because not found a linear struct previously
@@ -677,6 +679,8 @@ begin
       PCurrent^.MarkAsUsed(Self,PCurrent);
       Exit;
     end;
+  end else if Not Assigned(PCurrent) then begin
+    PCurrent := FCacheData.FindLowest;
   end;
 
   // Will need to create a new "linar struct" because not found a linear struct previously