summaryrefslogtreecommitdiff
path: root/src/OFURL.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/OFURL.m')
-rw-r--r--src/OFURL.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/OFURL.m b/src/OFURL.m
index 2069d0cb..96f4b5bf 100644
--- a/src/OFURL.m
+++ b/src/OFURL.m
@@ -482,9 +482,9 @@
if (_host != nil)
[ret appendString: [_host stringByURLEncoding]];
- if (([_scheme isEqual: @"http"] && _port != 80) ||
- ([_scheme isEqual: @"https"] && _port != 443) ||
- ([_scheme isEqual: @"ftp"] && _port != 21))
+ if (!(([_scheme isEqual: @"http"] && _port == 80) ||
+ ([_scheme isEqual: @"https"] && _port == 443) ||
+ ([_scheme isEqual: @"ftp"] && _port == 21)))
[ret appendFormat: @":%u", _port];
if (_path != nil)