Skip Menu |

This queue is for tickets about the MP3-Tag CPAN distribution.

Report information
The Basics
Id: 17060
Status: open
Priority: 0/
Queue: MP3-Tag

People
Owner: Nobody in particular
Requestors: jeremyhough [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.9703
  • 0.9704
Fixed in: (no value)



Subject: supported_majors incorrect comparison
I verified this in 0.9703, and it appears 0.9704 is broken too. I didn't check any other versions. This is a sort of off-by-one error I suppose. The version check compares the value of $major to the number of elements in @supported_majors minus one ($#supported_majors). So, for example, if you have $major equal to 4 [@supported_majors = (0,0,1,1,1)], then $major >= $#supported_majors is true (as in not supported) although $supported_majors[$major] == 1. This is the comparison (ID3v2.pm): # check the version if ($major >= $#supported_majors or $supported_majors[$major] == 0) { It just needs the "=" removed from ">=".
Subject: Re: [rt.cpan.org #17060] supported_majors incorrect comparison
Date: Fri, 13 Jan 2006 15:43:43 -0800
To: Guest via RT <bug-MP3-Tag [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Fri, Jan 13, 2006 at 03:06:54PM -0500, Guest via RT wrote: Show quoted text
> > Fri Jan 13 15:06:53 2006: Request 17060 was acted upon. > Transaction: Ticket created by guest > Queue: MP3-Tag > Subject: supported_majors incorrect comparison > Owner: Nobody > Requestors: jeremyhough@hotmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17060 > > > > I verified this in 0.9703, and it appears 0.9704 is broken too. I didn't > check any other versions. This is a sort of off-by-one error I suppose. > > The version check compares the value of $major to the number of elements > in @supported_majors minus one ($#supported_majors). So, for example, if > you have $major equal to 4 [@supported_majors = (0,0,1,1,1)], then > $major >= $#supported_majors is true (as in not supported) although > $supported_majors[$major] == 1. > > This is the comparison (ID3v2.pm): > > # check the version > if ($major >= $#supported_majors or $supported_majors[$major] == 0) { > > It just needs the "=" removed from ">=".
I think it works as designed. v2.4 is not yet fully supported. I'm not even sure it is fully supported for read (any confirmation is welcome); it is not supported at all for write. Hope this helps, Ilya
Subject: Re: [rt.cpan.org #17060] supported_majors incorrect comparison
Date: Mon, 16 Jan 2006 09:51:23 -0500
To: bug-MP3-Tag [...] rt.cpan.org
From: "Jeremy Hough" <jeremyhough [...] hotmail.com>
Show quoted text
>On Fri, Jan 13, 2006 at 03:06:54PM -0500, Guest via RT wrote: >I think it works as designed. v2.4 is not yet fully supported. I'm >not even sure it is fully supported for read (any confirmation is >welcome); it is not supported at all for write. > >Hope this helps, >Ilya
I apologize. I looked at this for a customer who was convinced 2.4 should work. I made the change described and the customer thinks it now works, so I'll forward your comments to him. For the record, I saw the comment that says "v2.4 is very compatible" and the line assigning 1 to $supported_majors[4]. I think you ought to fix the code to use all of @supported_majors rather than "all but the last element", but that's your call of course. Thanks for the clarification. Jeremy Hough