Refine dump_fonts().
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2014 18:47:24 +0000 (10:47 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 7 Nov 2014 18:47:24 +0000 (10:47 -0800)
dump.c

diff --git a/dump.c b/dump.c
index b21de36fea8643197e81b04db1aaf878fe4e3784..f1971871c55f9e020377e49cf2c475ccfc20f046 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -597,11 +597,26 @@ dump_fonts(void)
       match_u32_assert(0);
       match_u32_assert(0);
       match_byte_assert(0);
+
+      /* These seem unlikely to be correct too. */
+      if (i != 3)
+        {
+          match_u32_assert(8);
+          if (!match_u32(10))
+            match_u32_assert(11);
+          match_u32_assert(1);
+        }
+      else
+        {
+          get_u32();
+          if (!match_u32(-1) && !match_u32(8))
+            match_u32_assert(24);
+          if (!match_u32(-1) && !match_u32(2))
+            match_u32_assert(3);
+        }
+
+      /* Who knows? Ranges from -1 to 8 with no obvious pattern. */
       get_u32();
-      get_u32();
-      get_u32();
-      get_u32();
-      putchar('\n');
     }
 
   match_u32_assert(240);