summaryrefslogtreecommitdiff
path: root/src/tag
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/tag
parent5147654f6c6e452132be6bd4b8d525d1c1856878 (diff)
parentc2940a8385201b6501a43aefa6f9bee983950c01 (diff)
Merge tag 'v0.20.17'
release v0.20.17
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/ReplayGain.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tag/ReplayGain.cxx b/src/tag/ReplayGain.cxx
index 10f2f8a32..ccdcf3fc8 100644
--- a/src/tag/ReplayGain.cxx
+++ b/src/tag/ReplayGain.cxx
@@ -22,6 +22,7 @@
#include "VorbisComment.hxx"
#include "ReplayGainInfo.hxx"
#include "util/ASCII.hxx"
+#include "util/NumberParser.hxx"
#include <assert.h>
#include <stdlib.h>
@@ -33,16 +34,16 @@ ParseReplayGainTagTemplate(ReplayGainInfo &info, const T t)
const char *value;
if ((value = t["replaygain_track_gain"]) != nullptr) {
- info.track.gain = atof(value);
+ info.track.gain = ParseFloat(value);
return true;
} else if ((value = t["replaygain_album_gain"]) != nullptr) {
- info.album.gain = atof(value);
+ info.album.gain = ParseFloat(value);
return true;
} else if ((value = t["replaygain_track_peak"]) != nullptr) {
- info.track.peak = atof(value);
+ info.track.peak = ParseFloat(value);
return true;
} else if ((value = t["replaygain_album_peak"]) != nullptr) {
- info.album.peak = atof(value);
+ info.album.peak = ParseFloat(value);
return true;
} else
return false;