@@ -67,11 +67,11 @@ of_http_request_method_t _method; OFMutableDictionary *_clientHeaders; OFHTTPClient *_HTTPClient; char *_buffer; OFStream *_output; - intmax_t _received, _length, _resumedFrom; + unsigned long long _received, _length, _resumedFrom; ProgressBar *_progressBar; } - (void)downloadNextURL; @end @@ -374,18 +374,18 @@ @try { size_t pos = [proxy rangeOfString: @":" options: OF_STRING_SEARCH_BACKWARDS].location; OFString *host; - intmax_t port; + unsigned long long port; if (pos == OF_NOT_FOUND) @throw [OFInvalidFormatException exception]; host = [proxy substringWithRange: of_range(0, pos)]; - port = [proxy substringWithRange: - of_range(pos + 1, proxy.length - pos - 1)].decimalValue; + port = [proxy substringWithRange: of_range(pos + 1, + proxy.length - pos - 1)].unsignedLongLongValue; if (port > UINT16_MAX) @throw [OFOutOfRangeException exception]; [OFTCPSocket setSOCKS5Host: host]; @@ -783,11 +783,11 @@ if (type == nil) type = OF_LOCALIZED(@"type_unknown", @"unknown"); if (lengthString != nil) { - _length = lengthString.decimalValue; + _length = lengthString.unsignedLongLongValue; if (_resumedFrom + _length >= GIBIBYTE) { lengthString = [OFString stringWithFormat: @"%,.2f", (float)(_resumedFrom + _length) / GIBIBYTE]; @@ -1012,14 +1012,14 @@ @try { uintmax_t size = [[OFFileManager defaultManager] attributesOfItemAtPath: _currentFileName].fileSize; OFString *range; - if (size > INTMAX_MAX) + if (size > ULLONG_MAX) @throw [OFOutOfRangeException exception]; - _resumedFrom = (intmax_t)size; + _resumedFrom = (unsigned long long)size; range = [OFString stringWithFormat: @"bytes=%jd-", _resumedFrom]; [clientHeaders setObject: range forKey: @"Range"];