dump: treat >20 footnotes as an error (causes "regressions", of course)
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 2 Nov 2014 23:17:03 +0000 (15:17 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 2 Nov 2014 23:17:03 +0000 (15:17 -0800)
dump.c

diff --git a/dump.c b/dump.c
index cd4d362121f82bec29c9d7a706b64a1a632cccb6..12db0c07b3dec6912f8640700d0018d6b5512817 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1524,7 +1524,11 @@ dump_title(void)
 
   int n_footnotes = get_u32();
   if (n_footnotes >= 20)
-    fprintf(stderr, "%d footnotes\n", n_footnotes);
+    {
+      fprintf(stderr, "%08x: %d footnotes\n", pos - 4, n_footnotes);
+      exit(1);
+    }
+
   printf("------\n%d footnotes\n", n_footnotes);
   if (n_footnotes < 20)
     {