id3v2 : fix triple null termination utf-16 little endian. (#36)

* Fix triple null termination utf-16 little endian.

When fixing result[1] result[0] should be fixed as well.

* result[0] should be fixed before fixing result[1]
This commit is contained in:
Markus Krogh 2018-04-01 23:26:56 +02:00 committed by David Howden
parent ba105bfefc
commit f4ddc56a4c

View File

@ -370,6 +370,7 @@ func dataSplit(b []byte, enc byte) ([][]byte, error) {
if result[1][0] == 0 {
// there was a double (or triple) 0 and we cut too early
result[0] = append(result[0], result[1][0])
result[1] = result[1][1:]
}
return result, nil