mirror of
https://github.com/matrix-construct/construct
synced 2024-11-18 07:50: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 it ret{dest};
|
||||||
const size_t remain(stop - dest);
|
const size_t remain(stop - dest);
|
||||||
dest += std::min(size(src), remain);
|
const size_t cpsz{std::min(size(src), remain)};
|
||||||
memcpy(ret, data(src), dest - ret);
|
memcpy(ret, data(src), cpsz);
|
||||||
|
dest += cpsz;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue