From 4fd83e45a9a49574cc19bf4d579df0b3516857f1 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Wed, 3 May 2006 04:21:28 +0000 Subject: [PATCH] Fix blindingly obvious utf-16 to utf-8 bug, fixes bug #89 --- src/scan-wma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scan-wma.c b/src/scan-wma.c index ca7fabc4..b370a088 100644 --- a/src/scan-wma.c +++ b/src/scan-wma.c @@ -650,7 +650,7 @@ char *wma_utf16toutf8(unsigned char *utf16, int len) { } while(bytes) { - *dst++ = 0x80 | ((w1 >> (6*bytes)) & 0x3f); + *dst++ = 0x80 | ((w1 >> (6*(bytes-1))) & 0x3f); bytes--; } }