0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-16 08:58:20 +02:00

ircd: Fix bug.

This commit is contained in:
Jason Volk 2018-09-04 00:11:56 -07:00
parent 7ed69485c6
commit 1346fdd639

View file

@ -524,8 +524,9 @@ inline ircd::string_view
ircd::lstrip(string_view str,
const string_view &c)
{
while(startswith(str, c))
str = str.substr(size(c));
if(c)
while(startswith(str, c))
str = str.substr(size(c));
return str;
}
@ -536,8 +537,9 @@ ircd::lstrip(string_view str,
const string_view &c,
size_t n)
{
while(startswith(str, c) && n--)
str = str.substr(size(c));
if(c)
while(startswith(str, c) && n--)
str = str.substr(size(c));
return str;
}