truetype: Cast the numerical operands to 32-bit for LP64 systems.

This commit is contained in:
suzuki toshiya 2009-08-01 00:32:15 +09:00
parent 3b56c4d390
commit 6dc27526a9
2 changed files with 19 additions and 8 deletions

View File

@ -1,3 +1,12 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
truetype: Cast the numerical operands to 32-bit for LP64 systems.
* src/truetype/ttinterp.c (Ins_SPHIX, INS_MIAP,
Ins_MIRP): Insert cast from long (args[], the
operands passed to TrueType operator) to FT_Int32
(the argument of TT_MulFix14()).
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
truetype: Cast the project vector to 32-bit for LP64 system. truetype: Cast the project vector to 32-bit for LP64 system.

View File

@ -5527,20 +5527,20 @@
{ {
if ( CUR.GS.both_x_axis ) if ( CUR.GS.both_x_axis )
{ {
dx = TT_MulFix14( args[0], 0x4000 ); dx = TT_MulFix14( (FT_UInt32)args[0], 0x4000 );
dy = 0; dy = 0;
} }
else else
{ {
dx = 0; dx = 0;
dy = TT_MulFix14( args[0], 0x4000 ); dy = TT_MulFix14( (FT_UInt32)args[0], 0x4000 );
} }
} }
else else
#endif #endif
{ {
dx = TT_MulFix14( args[0], CUR.GS.freeVector.x ); dx = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.x );
dy = TT_MulFix14( args[0], CUR.GS.freeVector.y ); dy = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.y );
} }
while ( CUR.GS.loop > 0 ) while ( CUR.GS.loop > 0 )
@ -5706,8 +5706,8 @@
if ( CUR.GS.gep0 == 0 ) /* If in twilight zone */ if ( CUR.GS.gep0 == 0 ) /* If in twilight zone */
{ {
CUR.zp0.org[point].x = TT_MulFix14( distance, CUR.GS.freeVector.x ); CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance, CUR.GS.freeVector.x );
CUR.zp0.org[point].y = TT_MulFix14( distance, CUR.GS.freeVector.y ), CUR.zp0.org[point].y = TT_MulFix14( (FT_UInt32)distance, CUR.GS.freeVector.y ),
CUR.zp0.cur[point] = CUR.zp0.org[point]; CUR.zp0.cur[point] = CUR.zp0.org[point];
} }
@ -5894,10 +5894,12 @@
if ( CUR.GS.gep1 == 0 ) if ( CUR.GS.gep1 == 0 )
{ {
CUR.zp1.org[point].x = CUR.zp0.org[CUR.GS.rp0].x + CUR.zp1.org[point].x = CUR.zp0.org[CUR.GS.rp0].x +
TT_MulFix14( cvt_dist, CUR.GS.freeVector.x ); TT_MulFix14( (FT_UInt32)cvt_dist,
CUR.GS.freeVector.x );
CUR.zp1.org[point].y = CUR.zp0.org[CUR.GS.rp0].y + CUR.zp1.org[point].y = CUR.zp0.org[CUR.GS.rp0].y +
TT_MulFix14( cvt_dist, CUR.GS.freeVector.y ); TT_MulFix14( (FT_UInt32)cvt_dist,
CUR.GS.freeVector.y );
CUR.zp1.cur[point] = CUR.zp0.cur[point]; CUR.zp1.cur[point] = CUR.zp0.cur[point];
} }