mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
ircd::buffer: Fix bug.
This commit is contained in:
parent
69f05391a6
commit
81c3a87ee5
1 changed files with 3 additions and 2 deletions
|
@ -572,8 +572,9 @@ ircd::buffer::copy(it &dest,
|
|||
{
|
||||
const it ret{dest};
|
||||
const size_t remain(stop - dest);
|
||||
dest += std::min(size(src), remain);
|
||||
memcpy(ret, data(src), dest - ret);
|
||||
const size_t cpsz{std::min(size(src), remain)};
|
||||
memcpy(ret, data(src), cpsz);
|
||||
dest += cpsz;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue