CLI: Fix continuation lines after final one

Continuation lines may use short form (with space instead of message
number), but this should not be done when previous line is final.

Thanks to Kenth Eriksson for the bugreport and analysis.
This commit is contained in:
Ondrej Zajicek (work) 2019-11-26 16:43:09 +01:00
parent 0f88200247
commit d033e6327d

View file

@ -143,6 +143,7 @@ cli_printf(cli *c, int code, char *msg, ...)
{
size = bsprintf(buf, "%04d ", cd);
errcode = 8000;
cd = 0; /* Final message - no more continuation lines */
}
c->last_reply = cd;