@@ -16,10 +16,11 @@ #include "config.h" #import "OFMutableURL.h" #import "OFURL+Private.h" +#import "OFNumber.h" #import "OFString.h" @implementation OFMutableURL @dynamic scheme, host, port, user, password, path, parameters, query, fragment; @@ -45,13 +46,15 @@ OFString *old = _host; _host = [host copy]; [old release]; } -- (void)setPort: (uint16_t)port +- (void)setPort: (OFNumber *)port { - _port = port; + OFNumber *old = _port; + _port = [port copy]; + [old release]; } - (void)setUser: (OFString *)user { OFString *old = _user;