Project

General

Profile

id3-common.cc.diff

Jim Turner, October 21, 2020 04:47

View differences:

src/libaudtag/id3/id3-common.cc
303 303
    }
304 304
}
305 305

  
306
Index<char> id3_decode_picture (const char * data, int size)
306
Index<char> id3_decode_picture (const char * data, int size, int tagvsn)
307 307
{
308 308
    Index<char> buf;
309 309

  
......
311 311
    if (size < 2 || ! (nul = (char *) memchr (data + 1, 0, size - 2)))
312 312
        return buf;
313 313

  
314
    if (tagvsn == 2)    /* FOR v2.2 THE IMAGE FMT. IS FIXED AT 3 CHARS, *NOT* NULL-TERMINATED STRING! */
315
        nul = data + 3; /* SEE SPECS AT: v2.2:  https://id3.org/id3v2-00; V2.4: https://id3.org/id3v2.4.0-frames */
316

  
314 317
    int type = (unsigned char) nul[1];
315 318

  
316 319
    const char * body = nul + 2;