[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] integer suffix abuse
From: |
Tom Bishop, Wenlin Institute |
Subject: |
Re: [ft-devel] integer suffix abuse |
Date: |
Wed, 24 Jun 2015 16:14:51 -0400 |
> On Jun 24, 2015, at 4:00 PM, Alexei Podtelezhnikov <address@hidden> wrote:
>
>>
>> Here it is (I hope!). -Tom
>>
> Alright, your version of FreeTypeAmalgam.c is not this one:
> https://github.com/vinniefalco/FreeTypeAmalgam
> It looks like only two pieces of code affected:
> about 30 lines here from FreeTypeAmalgam.c:50372 to /FreeTypeAmalgam.c:50402
> and
> and around line FreeTypeAmalgam.c:144809
>
> Can you look up what it corresponds to in the real code? Thanks!
Yes, here's 50372 thru 50402:
{
FT_Fixed cond = args[0] && args[1];
FT_TRACE4(( " and\n" ));
args[0] = cond ? 0x10000L : 0;
args++;
}
break;
case cff_op_or:
{
FT_Fixed cond = args[0] || args[1];
FT_TRACE4(( " or\n" ));
args[0] = cond ? 0x10000L : 0;
args++;
}
break;
case cff_op_eq:
{
FT_Fixed cond = !args[0];
FT_TRACE4(( " eq\n" ));
args[0] = cond ? 0x10000L : 0;
args++;
}
break;
And here's 144801 thru 144810:
/* we need to scale the values by 1.0/temp_scale */
if ( temp_scale != 0x10000L )
{
temp[0] = FT_DivFix( temp[0], temp_scale );
temp[1] = FT_DivFix( temp[1], temp_scale );
temp[2] = FT_DivFix( temp[2], temp_scale );
temp[4] = FT_DivFix( temp[4], temp_scale );
temp[5] = FT_DivFix( temp[5], temp_scale );
temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L;
}
Tom
Wenlin Institute, Inc. SPC (a Social Purpose Corporation)
文林研究所社会目的公司
Software for Learning Chinese
E-mail: address@hidden Web: http://www.wenlin.com
Telephone: 1-877-4-WENLIN (1-877-493-6546)
☯
Re: [ft-devel] integer suffix abuse, Tom Bishop, Wenlin Institute, 2015/06/24