From 9548ce6885325c0772cf3d83ad40076844d4d846 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 4 Mar 2007 23:42:25 +0000 Subject: Fixed bug causing segfault if -a -n/m were passed together Issue structure was passed incorrectly to parsemedia Fixed fill correct issue(s) if it already exists Added default no_of_media to -1 git-archimport-id: getht@sv.gnu.org/getht--mainline--0.1--patch-4 --- tocxml.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tocxml.c') diff --git a/tocxml.c b/tocxml.c index da0771b..a909d5c 100644 --- a/tocxml.c +++ b/tocxml.c @@ -94,6 +94,7 @@ iss ** parsetoc(char *filepath, int * iss_no, int * latest) issue = tmp; + issue[no_of_issues]->no_of_media = -1; /* set default no of media */ issue[no_of_issues]->date.year = atoi( (const char *)(xmlStrsub(node->name,5,4)) ); tokenise_hyphons(xmlStrsub(cnode->name,6,5), &(issue[no_of_issues]->date.firstmonth), &(issue[no_of_issues]->date.lastmonth)); issue[no_of_issues]->no_of_sections = parseissue(file, cnode, issue[no_of_issues], latest); -- cgit v1.2.3