Learn to do pointer arithmatic (doh!)

This commit is contained in:
Brian Somers 1999-12-18 02:31:36 +00:00
parent a4415a1c07
commit aa4e734249

View File

@ -165,7 +165,7 @@ mbuf_Prepend(struct mbuf *bp, const void *ptr, size_t len, size_t extra)
return bp;
}
len -= bp->offset;
memcpy(bp + sizeof *bp, (const char *)ptr + len, bp->offset);
memcpy(bp + 1, (const char *)ptr + len, bp->offset);
bp->cnt += bp->offset;
bp->offset = 0;
}