diff --git a/lib/seq_buf.c b/lib/seq_buf.c index 62c20596ef42..6dafde851333 100644 --- a/lib/seq_buf.c +++ b/lib/seq_buf.c @@ -245,12 +245,14 @@ int seq_buf_putmem_hex(struct seq_buf *s, const void *mem, break; /* j increments twice per loop */ - len -= j / 2; hex[j++] = ' '; seq_buf_putmem(s, hex, j); if (seq_buf_has_overflowed(s)) return -1; + + len -= start_len; + data += start_len; } return 0; }