diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-11 09:49:57 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-11 15:10:13 +0100 |
commit | d0bd057ffe76d1951b04e9295243d0db5fccb0cd (patch) | |
tree | 9d919a1aa0cf3ce9be411c85fc8a48d245c598e2 | |
parent | a684cc175a6c1ca2cfc3bff2d68383d32008cb3b (diff) | |
download | rneovim-d0bd057ffe76d1951b04e9295243d0db5fccb0cd.tar.gz rneovim-d0bd057ffe76d1951b04e9295243d0db5fccb0cd.tar.bz2 rneovim-d0bd057ffe76d1951b04e9295243d0db5fccb0cd.zip |
Cleanup: Fix bad assert.
Assert will fail on first loop iteration (in that case,
prtpos.bytes_printed is 0).
-rw-r--r-- | src/nvim/hardcopy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index d072277d38..3898a29bca 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -731,7 +731,8 @@ void ex_hardcopy(exarg_T *eap) if (got_int || settings.user_abort) goto print_fail; - assert(prtpos.bytes_printed * 100 > prtpos.bytes_printed); + assert(prtpos.bytes_printed == 0 + || prtpos.bytes_printed * 100 > prtpos.bytes_printed); sprintf((char *)IObuff, _("Printing page %d (%zu%%)"), page_count + 1 + side, prtpos.bytes_printed * 100 / bytes_to_print); |