diff options
Diffstat (limited to 'src/gmutil.c')
-rw-r--r-- | src/gmutil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gmutil.c b/src/gmutil.c index df77a3e0..34132015 100644 --- a/src/gmutil.c +++ b/src/gmutil.c | |||
@@ -61,6 +61,11 @@ void init_Url(iUrl *d, const iString *text) { | |||
61 | d->host = capturedRange_RegExpMatch(&m, 3); | 61 | d->host = capturedRange_RegExpMatch(&m, 3); |
62 | d->port = capturedRange_RegExpMatch(&m, 7); | 62 | d->port = capturedRange_RegExpMatch(&m, 7); |
63 | } | 63 | } |
64 | /* Remove brackets from an IPv6 literal. */ | ||
65 | if (size_Range(&d->host) > 2 && d->host.start[0] == '[' && d->host.end[-1] == ']') { | ||
66 | d->host.start++; | ||
67 | d->host.end--; | ||
68 | } | ||
64 | } | 69 | } |
65 | } | 70 | } |
66 | 71 | ||