summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-05-01 21:12:40 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-05-01 21:12:40 +0000
commit8aa1577a0b802f17b89166ea5de34a7a9354dc3b (patch)
tree43163b2c0590e3767b5c10c7692eb8b613c7a3ed /apps
parent9af2ca73408fc529ecff7f774d6c0bf2e156aec7 (diff)
downloadrockbox-8aa1577a0b802f17b89166ea5de34a7a9354dc3b.tar.gz
rockbox-8aa1577a0b802f17b89166ea5de34a7a9354dc3b.zip
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
Diffstat (limited to 'apps')
-rw-r--r--apps/replaygain.c2
1 files changed, 1 insertions, 1 deletions
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)