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:
parent
6a25df6582
commit
d7ee810bc0
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue