* src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify. Based on a patch from Behdad.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
diff --git a/ChangeLog b/ChangeLog
index 8b3fe5f..53946aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2015-01-11 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
+
+ Based on a patch from Behdad.
+
+2015-01-11 Werner Lemberg <wl@gnu.org>
+
* src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
2015-01-11 Werner Lemberg <wl@gnu.org>
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index b530ec8..f929000 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -3348,30 +3348,6 @@
/*************************************************************************/
/* */
- /* JROT[]: Jump Relative On True */
- /* Opcode range: 0x78 */
- /* Stack: StkElt int32 --> */
- /* */
- static void
- Ins_JROT( TT_ExecContext exc,
- FT_Long* args )
- {
- if ( args[1] != 0 )
- {
- if ( args[0] == 0 && exc->args == 0 )
- exc->error = FT_THROW( Bad_Argument );
- exc->IP += args[0];
- if ( exc->IP < 0 ||
- ( exc->callTop > 0 &&
- exc->IP > exc->callStack[exc->callTop - 1].Def->end ) )
- exc->error = FT_THROW( Bad_Argument );
- exc->step_ins = FALSE;
- }
- }
-
-
- /*************************************************************************/
- /* */
/* JMPR[]: JuMP Relative */
/* Opcode range: 0x1C */
/* Stack: int32 --> */
@@ -3393,6 +3369,21 @@
/*************************************************************************/
/* */
+ /* JROT[]: Jump Relative On True */
+ /* Opcode range: 0x78 */
+ /* Stack: StkElt int32 --> */
+ /* */
+ static void
+ Ins_JROT( TT_ExecContext exc,
+ FT_Long* args )
+ {
+ if ( args[1] != 0 )
+ Ins_JMPR( exc, args );
+ }
+
+
+ /*************************************************************************/
+ /* */
/* JROF[]: Jump Relative On False */
/* Opcode range: 0x79 */
/* Stack: StkElt int32 --> */
@@ -3402,16 +3393,7 @@
FT_Long* args )
{
if ( args[1] == 0 )
- {
- if ( args[0] == 0 && exc->args == 0 )
- exc->error = FT_THROW( Bad_Argument );
- exc->IP += args[0];
- if ( exc->IP < 0 ||
- ( exc->callTop > 0 &&
- exc->IP > exc->callStack[exc->callTop - 1].Def->end ) )
- exc->error = FT_THROW( Bad_Argument );
- exc->step_ins = FALSE;
- }
+ Ins_JMPR( exc, args );
}