From: Janusz Dziemidowicz <rrapt...@nails.eu.org>

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.
---
 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);
     }
-- 
1.8.4

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

Reply via email to