Skip Menu |

This queue is for tickets about the Font-TTF CPAN distribution.

Report information
The Basics
Id: 42716
Status: resolved
Priority: 0/
Queue: Font-TTF

People
Owner: Nobody in particular
Requestors: pjt47 [...] cam.ac.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.47



Subject: new Coverage(0, ...) does not set 'max'
Date: Fri, 23 Jan 2009 12:43:57 +0000
To: bug-Font-TTF [...] rt.cpan.org
From: Philip Taylor <pjt47 [...] cam.ac.uk>
Font::TTF::Coverage's 'new' does not set $self->{'max'} when you construct a class definition table. 'max' is required by e.g. GPOS::out_sub, so attempts to write GPOS will fail if you've replaced its CLASS table, unless you make sure the CLASS table does have a correct 'max'. So Coverage::new ought to initialise 'max' correctly. -- Philip Taylor pjt47@cam.ac.uk
Subject: Re: [rt.cpan.org #42716] new Coverage(0, ...) does not set 'max'
Date: Mon, 26 Jan 2009 16:15:14 +0700
To: bug-Font-TTF [...] rt.cpan.org
From: Martin Hosken <martin_hosken [...] sil.org>
Fixed in 0.46
Subject: Re: [rt.cpan.org #42716] new Coverage(0, ...) does not set 'max'
Date: Mon, 26 Jan 2009 09:55:03 +0000
To: bug-Font-TTF [...] rt.cpan.org
From: Philip Taylor <pjt47 [...] cam.ac.uk>
martin_hosken@sil.org via RT wrote: Show quoted text
Thanks! But I think the patch in r576 is slightly wrong. It says: + { + $self->{'val'} = {@_}; + foreach (@_) {$self->{'max'} = $_ if $_ > $self->{'max'}} + } In the class-definition case, @_ is a list representation of a hash. 'max' should be the maximum of the hash's values, but this is computing the maximum of the values and keys. So it should be more like: + { + $self->{'val'} = {@_}; + foreach (values %{$self->{'val'}}) {$self->{'max'} = $_ if $_ > $self->{'max'}} + } -- Philip Taylor pjt47@cam.ac.uk
On Mon Jan 26 05:40:36 2009, pjt47@cam.ac.uk wrote: Show quoted text
> martin_hosken@sil.org via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=42716 > > > > > Fixed in 0.46
> > Thanks! But I think the patch in r576 is slightly wrong. It says: > > + { > + $self->{'val'} = {@_}; > + foreach (@_) {$self->{'max'} = $_ if $_ > $self->{'max'}} > + } > > In the class-definition case, @_ is a list representation of a hash. > 'max' should be the maximum of the hash's values, but this is computing > the maximum of the values and keys. > > So it should be more like: > > + { > + $self->{'val'} = {@_}; > + foreach (values %{$self->{'val'}}) {$self->{'max'} = $_ if $_ > > $self->{'max'}} > + } >