dump: Allow 1 in place of 3 at offset 0x2 in SPV file.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 27 Jul 2015 05:41:52 +0000 (22:41 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 27 Jul 2015 05:41:52 +0000 (22:41 -0700)
This fixes "dump all" up to an including dump_title() in the whole expanded
corpus.

dump.c

diff --git a/dump.c b/dump.c
index f9c315e580090dba9760640859b27eeae344066a..2ac89bcab71d3bc7c81c4f6083c9e2a7f678e1fc 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -878,7 +878,13 @@ main(int argc, char *argv[])
           pos = 0;
           match_byte_assert(1);
           match_byte_assert(0);
-          match_u32_assert(3);
+
+          /* This might be a version number of some kind, because it seems to
+             only appear in an SPV file that also required its own weird
+             special cases in dump_value_31(). */
+          if (!match_u32(1))
+            match_u32_assert(3);
+
           match_byte_assert(1);
           if (!match_byte(0))
             match_byte_assert(1);