0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

ircd::parse: Fix misconstruction; fix loop condition.

This commit is contained in:
Jason Volk 2018-12-31 12:27:00 -08:00
parent 6a25df6582
commit d7ee810bc0

View file

@ -54,7 +54,7 @@ struct ircd::parse::buffer
:base{data(mb)}
,parsed{data(mb)}
,read{data(mb) + old.unparsed()}
,stop{stop}
,stop{data(mb) + ircd::size(mb)}
{
memmove(base, old.base, old.unparsed());
}
@ -113,7 +113,7 @@ inline void
ircd::parse::capstan::operator()(const parse_closure &pc)
try
{
while(!pc(parsed, const_cast<const char *>(read)))
while(!pc(parsed, const_cast<const char *>(read)) && read != stop)
reader(read, stop);
}
catch(const std::bad_function_call &e)