libaacs | branch: master | Janusz Dziemidowicz <rrapt...@nails.eu.org> | Sun 
Dec 15 21:16:21 2013 +0200| [3fa97c179ac8e61ed53dfcd7a0f3e3f2e8a91c58] | 
committer: npzacs

Fix parsing of first title entry

f888ebf caused first title entry from KEYDB.cfg to be ignored as it is
trying to add entries to uninitialized list, and just prints following
warning:
Error: No title list passed as parameter.
Fix it by moving initialization to proper place.

> http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=3fa97c179ac8e61ed53dfcd7a0f3e3f2e8a91c58
---

 src/file/keydbcfg-parser.y |   22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/src/file/keydbcfg-parser.y b/src/file/keydbcfg-parser.y
index b58d44a..4b0ff08 100644
--- a/src/file/keydbcfg-parser.y
+++ b/src/file/keydbcfg-parser.y
@@ -266,23 +266,7 @@ host_key_point
 
 title_entry
   : newline_list disc_info entry_list NEWLINE
-    {
-      if (!cf->list) {
-        celist = cf->list = new_title_entry_list();
-      } else {
-      celist->next = new_title_entry_list();
-      celist = celist->next;
-      }
-    }
   | disc_info entry_list NEWLINE
-    {
-      if (!cf->list) {
-        celist = cf->list = new_title_entry_list();
-      } else {
-      celist->next = new_title_entry_list();
-      celist = celist->next;
-      }
-    }
   ;
 
 newline_list
@@ -293,6 +277,12 @@ newline_list
 disc_info
   : discid PUNCT_EQUALS_SIGN disc_title
     {
+      if (!cf->list) {
+        celist = cf->list = new_title_entry_list();
+      } else {
+        celist->next = new_title_entry_list();
+        celist = celist->next;
+      }
       add_entry(celist, ENTRY_TYPE_DISCID, $1);
       add_entry(celist, ENTRY_TYPE_TITLE, $3);
     }

_______________________________________________
libaacs-devel mailing list
libaacs-devel@videolan.org
https://mailman.videolan.org/listinfo/libaacs-devel

Reply via email to