summaryrefslogtreecommitdiff
path: root/junklib.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-13 17:10:40 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-13 17:10:40 +0100
commit115ade96d95d5149837b365e56d46af61a3df04c (patch)
tree2d06999d3b8030d5f113148805beeb6945452825 /junklib.c
parent1b77fdce30fc574bfce425db546217e91045e2ea (diff)
fixed ucs2 to utf8 conversion in junklib
Diffstat (limited to 'junklib.c')
-rw-r--r--junklib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/junklib.c b/junklib.c
index f492b5c0..7d22f710 100644
--- a/junklib.c
+++ b/junklib.c
@@ -270,9 +270,13 @@ convstr_id3v2_2to3 (const unsigned char* str, int sz) {
if (*str == 1) {
if (str[1] == 0xff && str[2] == 0xfe) {
enc = "UCS-2LE";
+ str += 2;
+ sz -= 2;
}
else if (str[2] == 0xff && str[1] == 0xfe) {
enc = "UCS-2BE";
+ str += 2;
+ sz -= 2;
}
else {
trace ("invalid ucs-2 signature %x %x\n", (int)str[1], (int)str[2]);