Skip to content
Browse files

Web update: do not divide by zero when there are no patches to download

  • Loading branch information...
1 parent 31d6e7e commit f1c71e1e0726ef5a076344a3f255e9bb657c76c9 @sbourdeauducq sbourdeauducq committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/flash.c
View
5 src/flash.c
@@ -461,10 +461,11 @@ static void download_patches(struct patchpool *pp)
/* TODO: ensure that the patch pool directory exists. Issue #25 precludes a simple mkdir(). */
- flash_state = DOWNLOAD_STATE_PATCHES;
-
done = 0;
total = patchpool_count(pp);
+ if(total == 0)
+ return;
+ flash_state = DOWNLOAD_STATE_PATCHES;
for(i=0;i<pp->alloc_size;i++) {
if(pp->names[i] != NULL) {
encoded = curl_author_needs_to_take_a_dump(pp->names[i]);

0 comments on commit f1c71e1

Please sign in to comment.
Something went wrong with that request. Please try again.