diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-13 17:10:40 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-13 17:10:40 +0100 |
commit | 115ade96d95d5149837b365e56d46af61a3df04c (patch) | |
tree | 2d06999d3b8030d5f113148805beeb6945452825 /junklib.c | |
parent | 1b77fdce30fc574bfce425db546217e91045e2ea (diff) |
fixed ucs2 to utf8 conversion in junklib
Diffstat (limited to 'junklib.c')
-rw-r--r-- | junklib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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]); |