1
0
Fork 0
forked from len0rd/rockbox

metadata: mp3: Simplify comment tag processing

Avoid unnecessary string comparison.

Change-Id: Ib1c5622f7b7760c43c4763930dc4ef6b409dbc05
This commit is contained in:
Roman Artiukhin 2024-11-07 11:12:01 +02:00 committed by Solomon Peachy
parent 2156d9874f
commit da478aaa32

View file

@ -996,8 +996,7 @@ retry_with_limit:
* remove them so unicode_munge can work correctly
*/
if((tr->tag_length == 4 && !memcmp( header, "COMM", 4)) ||
(tr->tag_length == 3 && !memcmp( header, "COM", 3))) {
if (tr->offset == offsetof(struct mp3entry, comment)) {
int offset;
if (buffersize - bufferpos <= 4)
return; /* Error ?? */