parse-wormedit: distinguish newer v95 level strings
authorMischa Poslawsky <wormy@shiar.org>
Mon, 2 Mar 2009 15:48:01 +0000 (16:48 +0100)
committerMischa Poslawsky <wormy@shiar.org>
Mon, 2 Mar 2009 21:42:36 +0000 (22:42 +0100)
Some 86s files exist with version identifier 95, which already contain
newer v97 features.
This is logically --version=96, but needs to be specified manually.

parse-wormedit

index 42d9d21..84e4e31 100755 (executable)
@@ -262,10 +262,11 @@ sub read {
                        # current @FORMAT
                }
                        $offsetbase = 0xF400;
+               when (96) {}
+                       ref $_ and splice(@$_, -8, 2) for @{ $FORMAT[11] }; # no multifood
+                       splice @FORMAT, 12, 2;  # no reserved byte
                when (95) {}
-                       splice @FORMAT, 6, 2;
-                       ref $_ and splice(@$_, -8, 2) for @{ $FORMAT[9] }; # no multifood
-                       splice @FORMAT, 10, 2;  # no reserved byte
+                       splice @FORMAT, 6, 2;  # no description
                when (94) {}
                when (90) {
                        $FORMAT[5] = 'C/a';  # length-preceding name