Learn to do pointer arithmatic (doh!)
This commit is contained in:
parent
a4415a1c07
commit
aa4e734249
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user