printk: Fix log_buf_copy termination.

If idx was non-zero and the log had wrapped, len did not get truncated
to stop at the last byte written to the log.
1 file changed