From 84d0288cbb05d2b17146edd9626e3d841be51f18 Mon Sep 17 00:00:00 2001 From: Damien Guard Date: Thu, 2 Jan 2025 13:35:48 +0000 Subject: [PATCH] Fix compiler warnings, bump rev. --- Source/DiskImageManager.lpi | 2 +- Source/DiskImageManager.res | Bin 10128 -> 10128 bytes Source/DskImage.pas | 3 +++ Source/filesystem.pas | 6 ++---- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/DiskImageManager.lpi b/Source/DiskImageManager.lpi index 337e110..9d17646 100644 --- a/Source/DiskImageManager.lpi +++ b/Source/DiskImageManager.lpi @@ -30,7 +30,7 @@ - + diff --git a/Source/DiskImageManager.res b/Source/DiskImageManager.res index 308e414fd04bae746557f9d476e0cef3e3a73b92..8da0fba88892f1ef42878ff01eae5490ffadf7ca 100644 GIT binary patch delta 52 zcmV-40L%Z7PmoWreg^>plYa+clW++fli&wLlZ**e2{HgK05JeC063E&2(y#y2`rP; K2%NJR3V0p4%Mfh< delta 52 zcmV-40L%Z7PmoWreg^>olYa+cll%unlb{H&lY9xBli&v&lRyYm2{8aJ05JeC063FP K2`{r43V0pp!w@k5 diff --git a/Source/DskImage.pas b/Source/DskImage.pas index 2f6ed26..83d0561 100644 --- a/Source/DskImage.pas +++ b/Source/DskImage.pas @@ -497,6 +497,7 @@ function TDSKImage.FindText(From: TDSKSector; Text: string; CaseSensitive: boole var NextSector: TDSKSector; begin + Result := nil; if From = nil then NextSector := Disk.Side[0].Track[0].Sector[0] else @@ -532,6 +533,7 @@ function TDSKImage.LoadFileDSK(DiskFile: TStream): boolean; begin Result := False; FoundIncorrectTrackMarkers := False; + NextTrackPosition := 0; DiskFile.ReadBuffer(DSKInfoBlock, SizeOf(DSKInfoBlock)); @@ -1353,6 +1355,7 @@ function TDSKTrack.GetFirstLogicalSector: TDSKSector; var Sector: TDSKSector; begin + Result := nil; if not IsFormatted then exit; Result := self.Sector[0]; diff --git a/Source/filesystem.pas b/Source/filesystem.pas index de86707..61498eb 100644 --- a/Source/filesystem.pas +++ b/Source/filesystem.pas @@ -280,7 +280,7 @@ procedure TDSKFileSystem.TryPlus3DOSHeader(Data: array of byte; DiskFile: TDSKFi Sig: string; CalcChecksum: byte; Idx: integer; - Length, Param1, Param2: word; + Param1: word; begin Sig := StrBlockClean(Data, 0, 8); if Sig <> 'PLUS3DOS' then exit; @@ -294,9 +294,7 @@ procedure TDSKFileSystem.TryPlus3DOSHeader(Data: array of byte; DiskFile: TDSKFi DiskFile.Size := Data[11] + (Data[12] << 8) + (Data[13] << 16) + (Data[14] << 24); DiskFile.HeaderSize := 128; - Length := Data[16] + (Data[17] << 8); Param1 := Data[18] + (Data[19] << 8); - Param2 := Data[20] + (Data[21] << 8); case Data[15] of 0: begin @@ -307,7 +305,7 @@ procedure TDSKFileSystem.TryPlus3DOSHeader(Data: array of byte; DiskFile: TDSKFi end; 1: DiskFile.Meta := Format('DATA %s(%d)', [char(Data[19] - 64), Data[129] + (Data[130] << 8)]); 2: DiskFile.Meta := Format('DATA %s$(%d)', [char(Data[19] - 128), Data[129] + (Data[130] << 8)]); - 3: DiskFile.Meta := Format('CODE %d,%d', [Param1, Length]); + 3: DiskFile.Meta := Format('CODE %d,%d', [Param1, Data[16] + (Data[17] << 8)]); else DiskFile.Meta := Format('Custom 0x%x', [Data[15]]); end;