mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-14 13:56:08 +00:00
re-order end-of-hostname validity check
This commit is contained in:
@@ -55,8 +55,8 @@ pub fn parseUrl(url: []const u8) !std.Uri {
|
|||||||
// The first '/' after the scheme marks the end of the hostname. If the first '/'
|
// The first '/' after the scheme marks the end of the hostname. If the first '/'
|
||||||
// following the end of the scheme is not at the right position this is not a
|
// following the end of the scheme is not at the right position this is not a
|
||||||
// valid mac address.
|
// valid mac address.
|
||||||
if (std.mem.indexOfScalarPos(u8, url_without_scheme, 0, '/') != 17 and
|
if (url_without_scheme.len != 17 and
|
||||||
url_without_scheme.len != 17)
|
std.mem.indexOfScalarPos(u8, url_without_scheme, 0, '/') != 17)
|
||||||
{
|
{
|
||||||
return error.HostnameIsNotMacAddress;
|
return error.HostnameIsNotMacAddress;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user