util-print: add 0 at end of buffer

Add a 0 at the end of the printed buffer to be sure we terminate
with a 0 to avoid problem when calling strlen().
pull/2804/head
Eric Leblond 8 years ago committed by Victor Julien
parent d61fa0c43c
commit 170591a0b1

@ -227,6 +227,7 @@ void PrintStringsToBuffer(uint8_t *dst_buf, uint32_t *dst_buf_offset_ptr, uint32
src_buf[ch] == '\n' ||
src_buf[ch] == '\r') ? (uint8_t)src_buf[ch] : '.');
}
dst_buf[dst_buf_size - 1] = 0;
return;
}

Loading…
Cancel
Save