mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-20 16:07:22 +00:00
nimble/monitor: Fix ble_monitor_out
It skipped character when breaking line on full buffer. X-Original-Commit: 5f5f286b4881abb142c9256be122cbe5d3fc7459
This commit is contained in:
@@ -345,9 +345,12 @@ ble_monitor_out(int c)
|
||||
static char buf[MYNEWT_VAL(BLE_MONITOR_CONSOLE_BUFFER_SIZE)];
|
||||
static size_t len;
|
||||
|
||||
if (c != '\n' && len < sizeof(buf) - 1) {
|
||||
if (c != '\n') {
|
||||
buf[len++] = c;
|
||||
return c;
|
||||
|
||||
if (len < sizeof(buf) - 1) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
buf[len++] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user