ID3 Genre with number 0 (Blues)

Lukáš Lalinský lalinsky at gmail.com
Mon Apr 12 20:35:38 CEST 2010


On Thu, Mar 11, 2010 at 5:05 PM, Thomas Post <post at equinux.com> wrote:
> I think I discovered another bug:
> id3v2framefactory.cpp line 430
> String text = s.substr(end + 1);
> int number = s.substr(1, end - 1).toInt();
> if (number > 0 && number <= 255 && !(ID3v1::genre(number) == text))
> newfields.append(s.substr(1, end - 1));
> if (!text.isEmpty())
> newfields.append(text);
> Shouldn't that number > 0  be a >= 0? Because when I have a ID3v2 tag with a
> genre number (0), nothing is returned.

For some reason I missed this email. Thank you for the bug report. It
can't be > 0, because String("foo").toInt() also returns 0. There
needs to be a check whether the value is numeric.

Anyway, the problem is now fixed in SVN
(http://websvn.kde.org/?view=revision&revision=1114089) and will be
released very soon in TagLib 1.6.3.

Lukas


More information about the taglib-devel mailing list