summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-07-17 14:42:21 +0100
committerNick White <hg@njw.me.uk>2011-07-17 14:42:21 +0100
commite4b78cbf607d90331d20ca3feec12c2b40f10251 (patch)
tree2f1fd0d03ad01a6d61bbca2462ec2221db220768
parent75c05e825809a3011df800398e169749404b9be9 (diff)
Fix page total bug
-rw-r--r--getgbook.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/getgbook.c b/getgbook.c
index 9fa9ff9..c208e25 100644
--- a/getgbook.c
+++ b/getgbook.c
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
if(!(totalpages = gettotalpages(bookid)))
die("Book has no pages\n");
- for(i=1; i<totalpages; i++) {
+ for(i=1; i<=totalpages; i++) {
snprintf(pg, 16, "%s%d", "PA", i);
if((page = getpagedetail(bookid, pg)) == NULL || page->url[0] == '\0') {
fprintf(stderr, "%s failed\n", pg);