mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix semi-deterministic bug with link parser
This commit is contained in:
parent
25a2c04b02
commit
db860b5907
|
@ -170,19 +170,16 @@ parseAnchor:
|
|||
|
||||
done:
|
||||
// check host
|
||||
if (this->hasMatch_)
|
||||
{
|
||||
this->hasMatch_ = isValidHostname(host) || isValidIpv4(host)
|
||||
this->hasMatch_ = isValidHostname(host) || isValidIpv4(host)
|
||||
#ifdef C_MATCH_IPV6_LINK
|
||||
|
||||
|| (hasHttp && isValidIpv6(host))
|
||||
|| (hasHttp && isValidIpv6(host))
|
||||
#endif
|
||||
;
|
||||
;
|
||||
|
||||
if (this->hasMatch_)
|
||||
{
|
||||
this->match_ = unparsedString;
|
||||
}
|
||||
if (this->hasMatch_)
|
||||
{
|
||||
this->match_ = unparsedString;
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -14,7 +14,7 @@ public:
|
|||
QString getCaptured() const;
|
||||
|
||||
private:
|
||||
bool hasMatch_;
|
||||
bool hasMatch_{false};
|
||||
QString match_;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue