Menu

#12 Prop\Type1FontData.cs

open
nobody
None
5
2005-05-31
2005-05-31
No

Bug occurs when < 0 index bounds not checked.

I had to add lower bounds checking, to fix in a hurry.

this is my resultant working function

public Type1FontData.CharMetrics afmCharMetrics
(Int32 iUnicode) {
if (iUnicode >= aCharMetrics.Length) {
if (iUnicode == 8364) {
return aCharMetrics[128];
}
return null;
}
if (iUnicode < 0)
{
return aCharMetrics
[128];
}
return aCharMetrics[iUnicode];
}

unfortunatly i dont know the data that was fed in. but
this fixed it.

Discussion


Log in to post a comment.