Fri Jan 23 07:44:56 2009pjt47 [...] cam.ac.uk - Ticket created
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
Mon Jan 26 04:16:01 2009martin_hosken [...] sil.org - Correspondence added
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
Mon Jan 26 04:16:02 2009The RT System itself - Status changed from 'new' to 'open'
Mon Jan 26 05:40:36 2009pjt47 [...] cam.ac.uk - Correspondence added
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
Tue Jan 07 20:37:27 2014MHOSKEN [...] cpan.org - Correspondence added
On Mon Jan 26 05:40:36 2009, pjt47@cam.ac.uk 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'}}
> + }
>
Tue Jan 07 20:37:28 2014MHOSKEN [...] cpan.org - Status changed from 'open' to 'resolved'
Tue Jan 07 20:37:29 2014MHOSKEN [...] cpan.org - Fixed in 0.47 added