logger: fix line_pos setup in rtt backend drop mode

Fix initial write position in line_buf when drop mode is selected.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
This commit is contained in:
Pavel Kral 2018-10-23 16:05:12 +02:00 committed by Carles Cufí
commit 02afc16dcb

View file

@ -83,7 +83,7 @@ static int line_out(u8_t data)
if (log_backend_rtt_write()) {
return 1;
}
line_pos = line_buf;
line_pos = drop_cnt > 0 ? line_buf + DROP_MSG_LEN : line_buf;
return 0;
}