- Added more checks to statics loading and saving and replaced unnecessary LongInt casts
This commit is contained in:
@@ -479,14 +479,14 @@ begin
|
||||
FStaIdx.Position := ((AWorldBlock.X * FHeight) + AWorldBlock.Y) * 12;
|
||||
index := TGenericIndex.Create(FStaIdx);
|
||||
size := AWorldBlock.GetSize;
|
||||
if (size > index.Size) or (index.Lookup = LongInt($FFFFFFFF)) then
|
||||
if (size > index.Size) or (index.Lookup < 0) then
|
||||
begin
|
||||
FStatics.Position := FStatics.Size;
|
||||
index.Lookup := FStatics.Position;
|
||||
end;
|
||||
index.Size := size;
|
||||
if size = 0 then
|
||||
index.Lookup := LongInt($FFFFFFFF)
|
||||
index.Lookup := -1
|
||||
else
|
||||
begin
|
||||
FStatics.Position := index.Lookup;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="/"/>
|
||||
<Version Value="6"/>
|
||||
<Version Value="7"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<LRSInOutputDirectory Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
|
||||
Reference in New Issue
Block a user