aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/alnumeric.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/alnumeric.h b/common/alnumeric.h
index 18df2689..a0b0fcf3 100644
--- a/common/alnumeric.h
+++ b/common/alnumeric.h
@@ -293,7 +293,7 @@ inline float gain_to_level_mb(float x)
{
if (x <= 0.0f)
return -10'000.0f;
- return std::log10(x * 2'000.0f);
+ return maxf(std::log10(x) * 2'000.0f, -10'000.0f);
}
#endif /* AL_NUMERIC_H */