Changeset 5159
- Timestamp:
- 01/07/08 00:25:15 (8 months ago)
- Files:
-
- libwired/trunk/libwired/data/wi-url.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libwired/trunk/libwired/data/wi-url.c
r4797 r5159 126 126 range = wi_string_range_of_string(string, WI_STR(":"), 0); 127 127 128 if(range.location == WI_NOT_FOUND) { 128 if(range.location == WI_NOT_FOUND || 129 range.location + range.length >= wi_string_length(string) || 130 wi_string_contains_string(wi_string_substring_from_index(string, range.location + 1), WI_STR(":"), 0)) { 129 131 url->host = wi_copy(string); 130 132 } else { 131 133 url->host = wi_retain(wi_string_substring_to_index(string, range.location)); 132 133 if(range.location + range.length < wi_string_length(string)) { 134 string = wi_string_substring_from_index(string, range.location + 1); 135 url->port = wi_string_uint32(string); 136 } 134 url->port = wi_string_uint32(wi_string_substring_from_index(string, range.location + 1)); 137 135 } 138 136
