Skip to content

Commit

Permalink
fix uninitialized variable without instrumentals tagfix uninitialized
Browse files Browse the repository at this point in the history
variable without instrumentals tag
  • Loading branch information
dgruss committed Jul 25, 2024
1 parent bcf6164 commit 19b09aa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/base/USong.pas
Original file line number Diff line number Diff line change
Expand Up @@ -878,9 +878,10 @@ function TSong.ReadTXTHeader(SongFile: TTextFileStream; ReadCustomTags: Boolean)
if (Self.Path.Append(EncFile).IsFile) then
begin
self.Mp3 := EncFile;
if self.Karaoke = PATH_NONE() then
if (not Assigned(self.Karaoke)) or (self.Karaoke = PATH_NONE()) then
begin
self.Karaoke := EncFile;

end;
//Add Mp3 Flag to Done
Done := Done or 4;
end
Expand Down Expand Up @@ -940,11 +941,11 @@ function TSong.ReadTXTHeader(SongFile: TTextFileStream; ReadCustomTags: Boolean)
end

// Karaoke Mp3
else if Identifier = 'INSTRUMENTAL' then
else if (Identifier = 'INSTRUMENTAL') then
begin
EncFile := DecodeFilename(Value);
if (self.Path.Append(EncFile).IsFile) then
self.Karaoke := EncFile
self.Karaoke := EncFile;
end

// Video Gap
Expand Down

0 comments on commit 19b09aa

Please sign in to comment.