cactusjukebox: Fix floating point-to-string conversion error

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9254 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2024-02-23 10:42:12 +00:00
parent 00b7a55956
commit 0db0bf4880
2 changed files with 9 additions and 6 deletions

View File

@ -18,7 +18,7 @@
<AutoIncrementBuild Value="True"/>
<MinorVersionNr Value="3"/>
<RevisionNr Value="5"/>
<BuildNr Value="755"/>
<BuildNr Value="758"/>
<StringTable ProductVersion="0.3.5.737"/>
</VersionInfo>
<BuildModes Count="3">

View File

@ -364,6 +364,7 @@ var tmps: string;
i:integer;
time: real;
begin
result := -1;
if GetMPlayerPlaying then begin
i:=0;
repeat begin
@ -375,11 +376,13 @@ begin
until (pos('time_pos', tmps)>0) or (i>=3);
i:=LastDelimiter('=', tmps);
if i > 0 then begin
time:= StrToFloat(Copy(tmps, i+1, Length(tmps)), MPlayerFormatSettings);
time:=time*1000;
result:=round(time);
end else result:=-1;
end else result:=-1;
if TryStrToFloat(Copy(tmps, i+1, Length(tmps)), time, MPlayerFormatSettings) then
begin
time:=time*1000;
result:=round(time);
end;
end;
end;
end;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++