Fix some issues with exceptional data
authorJelmer Vernooij <jelmer@samba.org>
Mon, 7 Mar 2005 08:10:50 +0000 (09:10 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 7 Mar 2005 08:10:50 +0000 (09:10 +0100)
ChangeLog
ptb.c
ptb.h

index ba7a8a0feff7d60a43196953da11dba699de426a..52d95b5a74077d7377dab73dc93756c28ba00157 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@ All changes, unless specified otherwise, made by Jelmer Vernooij
 <jelmer@samba.org>.
 
 0.4.2:
+ * Fix bugs when reading odd combinations of symbols (multiple 
+        coda symbols, etc)
  * Add ptbdict utility
  * Add parser for ptb tuning dictionaries (thanks to Matthias 
                Vogelgesang for information about the file format)
diff --git a/ptb.c b/ptb.c
index a13e8feb854fafd106e458467f37f504a3e15b0e..68c8b4998afbb6d4973160f35df2ee77258486a3 100644 (file)
--- a/ptb.c
+++ b/ptb.c
@@ -896,7 +896,9 @@ static int handle_CRhythmSlash (struct ptbf *bf, const char *section, struct ptb
 static int handle_CDirection (struct ptbf *bf, const char *section, struct ptb_list **dest) { 
        struct ptb_direction *direction = GET_ITEM(bf, dest, struct ptb_direction);
 
-       ptb_data_unknown(bf, 4); /* FIXME */
+       ptb_data_unknown(bf, 1);
+       ptb_data(bf, &direction->nr_items, 1);
+       ptb_data_unknown(bf, 2 * direction->nr_items); /* FIXME */
 
        *dest = (struct ptb_list *)direction;
        return 1;
diff --git a/ptb.h b/ptb.h
index 9c29ada7eb7a1e2c23a46ee350e4ec6234fda8af..1ed1a81f0b80c75ac925daaadcb5948a77e48721 100644 (file)
--- a/ptb.h
+++ b/ptb.h
@@ -362,6 +362,7 @@ struct ptb_rhythmslash {
 
 struct ptb_direction {
        struct ptb_direction *prev, *next;
+       uint8_t nr_items;
 };
 
 struct ptbf {