Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong...
[pdfium.git] / core / src / fxge / fx_freetype / fxft2.5.01 / src / cff / cf2intrp.c
index 12f5dd7..fc11100 100644 (file)
     CF2_HintMaskRec   hintMask;
     CF2_GlyphPathRec  glyphPath;
 
-       int refCount = 0;
-
-
     /* initialize the remaining objects */
     cf2_arrstack_init( &subrStack,
                        memory,
       goto exit;
 
     /* main interpreter loop */
-    while ( refCount++ < 10240 )
+    while ( 1 )
     {
       if ( cf2_buf_isEnd( charstring ) )
       {
         curY += cf2_stack_popFixed( opStack );
 
         cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+               if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
 
         break;
 
             curY += cf2_stack_getReal( opStack, index + 1 );
 
             cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
           }
 
           cf2_stack_clear( opStack );
             isX = !isX;
 
             cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
           }
 
           cf2_stack_clear( opStack );
 
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
 
             curX   = x3;
             curY   = y3;
             curY += cf2_stack_getReal( opStack, index + 1 );
 
             cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
           }
 
           cf2_stack_clear( opStack );
         curX += cf2_stack_popFixed( opStack );
 
         cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+               if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
 
         break;
 
         curX += cf2_stack_popFixed( opStack );
 
         cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+               if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
 
         break;
 
             curY += cf2_stack_getReal( opStack, index + 1 );
 
             cf2_glyphpath_lineTo( &glyphPath, curX, curY );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
             index += 2;
           }
 
 
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
 
             curX   = x3;
             curY   = y3;
             y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
 
             curX   = x3;
             curY   = y3;
             y3 = y2;
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
 
             curX   = x3;
             curY   = y3;
             }
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
+                       if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
 
             curX   = x3;
             curY   = y3;