summaryrefslogtreecommitdiff
path: root/getgbook.c
diff options
context:
space:
mode:
Diffstat (limited to 'getgbook.c')
-rw-r--r--getgbook.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/getgbook.c b/getgbook.c
index 62faf46..e60316f 100644
--- a/getgbook.c
+++ b/getgbook.c
@@ -12,6 +12,7 @@
#define URLMAX 1024
#define STRMAX 1024
+#define MAXPAGES 9999
#define COOKIENUM 5
typedef struct {
@@ -121,8 +122,8 @@ int main(int argc, char *argv[])
if(argc == 2) {
Page **page;
- page = malloc(sizeof(*page) * 1000);
- for(i=0; i<1000; i++) page[i] = malloc(sizeof(**page));
+ page = malloc(sizeof(*page) * MAXPAGES);
+ for(i=0; i<MAXPAGES; i++) page[i] = malloc(sizeof(**page));
if(!(totalpages = getpagelist(bookid, page))) {
fprintf(stderr, "Could not find pages for %s\n", bookid);
return 1;