summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/cid/cidparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/cid/cidparse.c')
-rw-r--r--src/3rdparty/freetype/src/cid/cidparse.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/3rdparty/freetype/src/cid/cidparse.c b/src/3rdparty/freetype/src/cid/cidparse.c
index efed618f5a..d8476cdae8 100644
--- a/src/3rdparty/freetype/src/cid/cidparse.c
+++ b/src/3rdparty/freetype/src/cid/cidparse.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 parser (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 1996-2007, 2009, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -73,8 +73,8 @@
if ( ft_strncmp( (char *)stream->cursor,
"%!PS-Adobe-3.0 Resource-CIDFont", 31 ) )
{
- FT_TRACE2(( "[not a valid CID-keyed font]\n" ));
- error = CID_Err_Unknown_File_Format;
+ FT_TRACE2(( " not a CID-keyed font\n" ));
+ error = FT_THROW( Unknown_File_Format );
}
FT_FRAME_EXIT();
@@ -99,7 +99,7 @@
if ( stream_len == 0 )
{
FT_TRACE2(( "cid_parser_new: no `StartData' keyword found\n" ));
- error = CID_Err_Unknown_File_Format;
+ error = FT_THROW( Invalid_File_Format );
goto Exit;
}
@@ -117,12 +117,12 @@
if ( p[0] == 'S' && ft_strncmp( (char*)p, "StartData", 9 ) == 0 )
{
/* save offset of binary data after `StartData' */
- offset += p - buffer + 10;
+ offset += (FT_ULong)( p - buffer + 10 );
goto Found;
}
else if ( p[1] == 's' && ft_strncmp( (char*)p, "/sfnts", 6 ) == 0 )
{
- offset += p - buffer + 7;
+ offset += (FT_ULong)( p - buffer + 7 );
goto Found;
}
}
@@ -178,14 +178,12 @@
if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 )
parser->binary_length = ft_atol( (const char *)arg2 );
- limit = parser->root.limit;
- cur = parser->root.cursor;
goto Exit;
}
else if ( cur[1] == 's' && ft_strncmp( (char*)cur, "/sfnts", 6 ) == 0 )
{
FT_TRACE2(( "cid_parser_new: cannot handle Type 11 fonts\n" ));
- error = CID_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}