From 1f0a1fd57bd1dbddab4ad189a721fbe67f59ca3a Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 29 Apr 2007 13:07:45 +0000 Subject: Completed issue malloc, fixed build warnings Used malloc to dynamically assign enough memory for sections, items, and media, using the functionality of issuemem.c Included some function definitions in issue.h to remove various build warnings git-archimport-id: getht@sv.gnu.org/getht--mainline--0.1--patch-21 --- download.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'download.c') diff --git a/download.c b/download.c index 6c9ccae..1108b6d 100644 --- a/download.c +++ b/download.c @@ -162,10 +162,10 @@ void downloadissue(CURL *curl_handle, char * directory, iss * issue, int force) } int count; - for(cur_section = issue->section, count = 0; - count <= issue->no_of_sections; - cur_section++, count++) + for(count = 0; count <= issue->no_of_sections; count++) { + cur_section = issue->section[count]; + snprintf(filename,STR_MAX,"%s/section_%i.pdf", newdir, cur_section->number); if(!force){ testfile = fopen(filename, "r"); -- cgit v1.2.3