From 7aea2853612743e111ae5e947c8d467049e291a8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Apr 2020 06:57:04 +0200 Subject: [PATCH] Revert "Fix unsafe float comparison." This reverts commit a5273d699274c0a6274052bb80fcfdd5c7fac88b. It was wrong and broke the MixRamp unit test. Closes https://github.com/MusicPlayerDaemon/MPD/issues/844 --- NEWS | 1 + src/player/CrossFade.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index fa4954baa..25181d973 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.21.24 (not yet released) +* fix unit test failure ver 0.21.23 (2020/04/23) * protocol diff --git a/src/player/CrossFade.cxx b/src/player/CrossFade.cxx index beb9b18a5..b31610e66 100644 --- a/src/player/CrossFade.cxx +++ b/src/player/CrossFade.cxx @@ -62,7 +62,7 @@ mixramp_interpolate(const char *ramp_list, float required_db) noexcept ++ramp_list; /* Check for exact match. */ - if (db >= required_db) { + if (db == required_db) { return duration; }