Skip to content

Commit

Permalink
Fix compiler warnings, bump rev.
Browse files Browse the repository at this point in the history
  • Loading branch information
damieng committed Jan 2, 2025
1 parent 39df22c commit 84d0288
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/DiskImageManager.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<AutoIncrementBuild Value="True"/>
<MajorVersionNr Value="2"/>
<MinorVersionNr Value="8"/>
<RevisionNr Value="1"/>
<RevisionNr Value="2"/>
<BuildNr Value="108"/>
<StringTable CompanyName="Envy Technologies" InternalName="Disk Image Manager" LegalCopyright="Copyright 2002-2024 Damien Guard." OriginalFilename="DiskImageManager.exe" ProductName="Disk Image Manager"/>
</VersionInfo>
Expand Down
Binary file modified Source/DiskImageManager.res
Binary file not shown.
3 changes: 3 additions & 0 deletions Source/DskImage.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -532,6 +533,7 @@ function TDSKImage.LoadFileDSK(DiskFile: TStream): boolean;
begin
Result := False;
FoundIncorrectTrackMarkers := False;
NextTrackPosition := 0;

DiskFile.ReadBuffer(DSKInfoBlock, SizeOf(DSKInfoBlock));

Expand Down Expand Up @@ -1353,6 +1355,7 @@ function TDSKTrack.GetFirstLogicalSector: TDSKSector;
var
Sector: TDSKSector;
begin
Result := nil;
if not IsFormatted then exit;

Result := self.Sector[0];
Expand Down
6 changes: 2 additions & 4 deletions Source/filesystem.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 84d0288

Please sign in to comment.