summaryrefslogtreecommitdiff
path: root/getgbook.c
diff options
context:
space:
mode:
Diffstat (limited to 'getgbook.c')
-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);