Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: vlasenko [...] imath.kiev.ua
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.04
Fixed in: 1.04_90



Subject: syntax error in lib/Font/TTF/OldCmap.pm
syntax error at Font/TTF/OldCmap.pm line 273, near "++) guessed quickfix ($k = 0 is my guess) --- Font-TTF-1.04/lib/Font/TTF/OldCmap.pm~ 2014-01-10 02:09:34.000000000 +0000 +++ Font-TTF-1.04/lib/Font/TTF/OldCmap.pm 2014-03-07 08:27:31.007184699 +0000 @@ -269,7 +269,7 @@ for ($j = 0; $j < $num; $j++) { $delta = $segs->[$j]{'VAL'}[0]; $flat = 1; - for ($k = $k < $segs->[$j]{'LEN'}; $k++) + for ($k = 0; $k < $segs->[$j]{'LEN'}; $k++) { if ($segs->[$j]{'VAL'}[$k] == 0) { $flat = 0; }
Thanks for this report. Looking at the subversion logs, it appears this was a retrograde at r959. Based on previous versions it looks like the correct code would initialize k to 1, not 0. Patch (attached) has been applied to source repo
Subject: OldCmap.patch
--- Font-TTF-1.04/lib/Font/TTF/OldCmap.pm Wed Jan 8 15:31:54 2014 +++ Font-TTF-1.04/lib/Font/TTF/OldCmap.pm Thu Apr 3 20:44:27 2014 @@ -269,7 +269,7 @@ for ($j = 0; $j < $num; $j++) { $delta = $segs->[$j]{'VAL'}[0]; $flat = 1; - for ($k = $k < $segs->[$j]{'LEN'}; $k++) + for ($k = 1; $k < $segs->[$j]{'LEN'}; $k++) { if ($segs->[$j]{'VAL'}[$k] == 0) { $flat = 0; }