mirror of
https://github.com/anope/anope.git
synced 2026-06-26 09:36:38 +02:00
Fixed parsing cidr masks
This commit is contained in:
+1
-1
@@ -1190,7 +1190,7 @@ bool str_is_cidr(const Anope::string &str, uint32 &ip, uint32 &mask, Anope::stri
|
||||
{
|
||||
Anope::string s;
|
||||
/* There's a CIDR mask here! */
|
||||
cidr = convertTo<uint16>(s.substr(1), s, false);
|
||||
cidr = convertTo<uint16>(cidr_str.substr(1), s, false);
|
||||
/* Bail out if the CIDR is invalid or the string isn't done yet */
|
||||
if (cidr > 32 || !s.empty())
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user