summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-02-10 09:18:37 +0100
committerMax Kellermann <max@musicpd.org>2020-02-10 09:18:37 +0100
commit5397d18ed9680a4d09427dffcd2f994a31828ea5 (patch)
tree15ed9000c3a62ad97723b815a30899c0b7ee6e99 /src
parent42eb69f46f7950862cd175b0a36f4fa531429ba8 (diff)
protocol/ArgParser: cast seek offset to SignedSongTime
"The issue is that ParseCommandArgSignedSongTime parses with SongTime::FromS, not SignedSongTime::FromS, before casting back to a SignedSongTime for the return. With x86 overflow rules this doesn't matter, but on ARM the first cast turns negative values to zero." Closes https://github.com/MusicPlayerDaemon/MPD/issues/757
Diffstat (limited to 'src')
-rw-r--r--src/protocol/ArgParser.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocol/ArgParser.cxx b/src/protocol/ArgParser.cxx
index b162c1984..fdd2b4a5d 100644
--- a/src/protocol/ArgParser.cxx
+++ b/src/protocol/ArgParser.cxx
@@ -175,5 +175,5 @@ SignedSongTime
ParseCommandArgSignedSongTime(const char *s)
{
auto value = ParseCommandArgFloat(s);
- return SongTime::FromS(value);
+ return SignedSongTime::FromS(value);
}