diff options
author | Max Kellermann <max@musicpd.org> | 2018-02-09 20:46:55 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-02-09 22:54:22 +0100 |
commit | e8b70dbca43340c4d8c4ed3b7aff508b5dce40d3 (patch) | |
tree | d2c5bc87a52d669948ef09edb1c39ba24c5fe53c /src/SongSave.cxx | |
parent | 0f8d223c7fcc7e61808716dbb740786b9d95a991 (diff) |
SongSave, queue/PlaylistState, tag/ReplayGain: use portable atof() wrappers
For Android pre-5.0 compatibility (#213).
Diffstat (limited to 'src/SongSave.cxx')
-rw-r--r-- | src/SongSave.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SongSave.cxx b/src/SongSave.cxx index ace38d4fe..ed5ab6d30 100644 --- a/src/SongSave.cxx +++ b/src/SongSave.cxx @@ -28,6 +28,7 @@ #include "tag/TagBuilder.hxx" #include "util/StringUtil.hxx" #include "util/RuntimeError.hxx" +#include "util/NumberParser.hxx" #include <string.h> #include <stdlib.h> @@ -94,7 +95,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) { |