summaryrefslogtreecommitdiff
path: root/src/SongSave.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-02-11 13:22:43 +0100
committerMax Kellermann <max@musicpd.org>2018-02-11 13:22:43 +0100
commit65bbb0e0aa0f613a9da683900838d2912f2454ba (patch)
tree3527ff6fdec933826a9278a611166d4b69f14827 /src/SongSave.cxx
parent5147654f6c6e452132be6bd4b8d525d1c1856878 (diff)
parentc2940a8385201b6501a43aefa6f9bee983950c01 (diff)
Merge tag 'v0.20.17'
release v0.20.17
Diffstat (limited to 'src/SongSave.cxx')
-rw-r--r--src/SongSave.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SongSave.cxx b/src/SongSave.cxx
index ab80c5c75..c3593d823 100644
--- a/src/SongSave.cxx
+++ b/src/SongSave.cxx
@@ -30,6 +30,7 @@
#include "util/ChronoUtil.hxx"
#include "util/StringStrip.hxx"
#include "util/RuntimeError.hxx"
+#include "util/NumberParser.hxx"
#include <string.h>
#include <stdlib.h>
@@ -98,7 +99,7 @@ song_load(TextFile &file, const char *uri)
if ((type = tag_name_parse(line)) != TAG_NUM_OF_ITEM_TYPES) {
tag.AddItem(type, value);
} else if (strcmp(line, "Time") == 0) {
- tag.SetDuration(SignedSongTime::FromS(atof(value)));
+ tag.SetDuration(SignedSongTime::FromS(ParseDouble(value)));
} else if (strcmp(line, "Playlist") == 0) {
tag.SetHasPlaylist(strcmp(value, "yes") == 0);
} else if (strcmp(line, SONG_MTIME) == 0) {