* src/pfr/pfrcmap.c (pfr_cmap_init): Convert assertion into normal
FreeType error.
This commit is contained in:
parent
2a2dca6b40
commit
a8d65494cb
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
* src/base/ftoutln.c (FT_Outline_Decompose): Check `last'.
|
* src/base/ftoutln.c (FT_Outline_Decompose): Check `last'.
|
||||||
|
|
||||||
|
|
||||||
|
* src/pfr/pfrcmap.c (pfr_cmap_init): Convert assertion into normal
|
||||||
|
FreeType error.
|
||||||
|
|
||||||
2007-06-05 Werner Lemberg <wl@gnu.org>
|
2007-06-05 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* src/pfr/pfrgload.c (pfr_glyph_done): Comment out unused code.
|
* src/pfr/pfrgload.c (pfr_glyph_done): Comment out unused code.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* FreeType PFR cmap handling (body). */
|
/* FreeType PFR cmap handling (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2002 by */
|
/* Copyright 2002, 2007 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
@ -24,7 +24,8 @@
|
||||||
FT_CALLBACK_DEF( FT_Error )
|
FT_CALLBACK_DEF( FT_Error )
|
||||||
pfr_cmap_init( PFR_CMap cmap )
|
pfr_cmap_init( PFR_CMap cmap )
|
||||||
{
|
{
|
||||||
PFR_Face face = (PFR_Face)FT_CMAP_FACE( cmap );
|
FT_Error error = PFR_Err_Ok;
|
||||||
|
PFR_Face face = (PFR_Face)FT_CMAP_FACE( cmap );
|
||||||
|
|
||||||
|
|
||||||
cmap->num_chars = face->phy_font.num_chars;
|
cmap->num_chars = face->phy_font.num_chars;
|
||||||
|
@ -39,11 +40,15 @@
|
||||||
for ( n = 1; n < cmap->num_chars; n++ )
|
for ( n = 1; n < cmap->num_chars; n++ )
|
||||||
{
|
{
|
||||||
if ( cmap->chars[n - 1].char_code >= cmap->chars[n].char_code )
|
if ( cmap->chars[n - 1].char_code >= cmap->chars[n].char_code )
|
||||||
FT_ASSERT( 0 );
|
{
|
||||||
|
error = PFR_Err_Invalid_Table;
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
Exit:
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue