summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2010-09-20 19:06:23 +0900
committersuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2010-09-20 19:06:23 +0900
commitd2b8b8db8a3325c4349976380983df27e46106e0 (patch)
tree08d236e6eb5cd83af029d05b545e33c7b2708f19
parente0a9a93330d3057ddf532205709ba4e1423b2557 (diff)
downloadfreetype2-d2b8b8db8a3325c4349976380983df27e46106e0.tar.gz
[sfnt] Make error message filling NULL names less verbose.
* src/sfnt/ttpost.c (load_format_20): Showing 1 summary message when we fill `post' names by NULL, instead of per-entry message.
-rw-r--r--ChangeLog7
-rw-r--r--src/sfnt/ttpost.c20
2 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d6f2003d..3a754d6e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [sfnt] Make error message filling NULL names less verbose.
+
+ * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
+ when we fill `post' names by NULL, instead of per-entry message.
+
2010-09-20 Graham Asher <graham.asher@btinternet.com>
David Bevan <david.bevan@pb.com>
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index 642f1ab7e..b672d093d 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -232,12 +232,7 @@
if ( FT_STREAM_POS() >= post_limit )
- {
- FT_ERROR(( "load_format_20:"
- " all entries in post table are already parsed,"
- " using NULL for gid %d\n", n ));
- len = 0;
- }
+ break;
else
{
FT_TRACE6(( "load_format_20: %d byte left in post table\n",
@@ -263,6 +258,19 @@
name_strings[n][len] = '\0';
}
+
+ if ( n < num_names )
+ {
+ FT_ERROR(( "load_format_20:"
+ " all entries in post table are already parsed,"
+ " using NULL names for gid %d - %d\n",
+ n, num_names - 1 ));
+ for ( ; n < num_names; n++ )
+ if ( FT_NEW_ARRAY( name_strings[n], 1 ) )
+ goto Fail1;
+ else
+ name_strings[n][0] = '\0';
+ }
}
/* all right, set table fields and exit successfully */