@@ -282,12 +282,12 @@ if (![line hasPrefix: @"HTTP/1.0 "] && ![line hasPrefix: @"HTTP/1.1 "]) @throw [OFInvalidServerReplyException newWithClass: isa]; - status = (int)[[line substringFromIndex: 9 - toIndex: 12] decimalValue]; + status = (int)[[line substringWithRange: + of_range(9, 3)] decimalValue]; serverHeaders = [OFMutableDictionary dictionary]; while ((line = [sock readLine]) != nil) { OFString *key, *value;