mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
Cleanup: Fix bad assert.
Assert will fail on first loop iteration (in that case, prtpos.bytes_printed is 0).
This commit is contained in:
@@ -731,7 +731,8 @@ void ex_hardcopy(exarg_T *eap)
|
|||||||
if (got_int || settings.user_abort)
|
if (got_int || settings.user_abort)
|
||||||
goto print_fail;
|
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%%)"),
|
sprintf((char *)IObuff, _("Printing page %d (%zu%%)"),
|
||||||
page_count + 1 + side,
|
page_count + 1 + side,
|
||||||
prtpos.bytes_printed * 100 / bytes_to_print);
|
prtpos.bytes_printed * 100 / bytes_to_print);
|
||||||
|
Reference in New Issue
Block a user