From 8aa1577a0b802f17b89166ea5de34a7a9354dc3b Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sun, 1 May 2011 21:12:40 +0000 Subject: Display the correct sign of replaygain for levels from -0.99 to -0.01 dB. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29814 a1c6a512-1295-4272-9138-f99709370657 --- apps/replaygain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/replaygain.c b/apps/replaygain.c index 5eb745a5f1..a178321385 100644 --- a/apps/replaygain.c +++ b/apps/replaygain.c @@ -43,7 +43,7 @@ void replaygain_itoa(char* buffer, int length, long int_gain) /* int_gain uses Q19.12 format. */ int one = abs(int_gain) >> FP_BITS; int cent = ((abs(int_gain) & 0x0fff) * 100 + (FP_ONE/2)) >> FP_BITS; - snprintf(buffer, length, "%d.%02d dB", (int_gain<0) ? -one : one, cent); + snprintf(buffer, length, "%s%d.%02d dB", (int_gain<0) ? "-":"", one, cent); } static long fp_atof(const char* s, int precision) -- cgit v1.2.3