aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-url.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-url.c')
-rw-r--r--camel/camel-url.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/camel/camel-url.c b/camel/camel-url.c
index cdbccfe14e..7033913ea0 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -65,11 +65,13 @@ camel_url_new_with_base (CamelURL *base, const char *url_string)
* FUNCTION, RUN tests/misc/url AFTERWARDS.
*/
- /* Find fragment. */
+ /* Find fragment. RFC 1808 2.4.1 */
end = hash = strchr (url_string, '#');
- if (hash && hash[1]) {
- url->fragment = g_strdup (hash + 1);
- camel_url_decode (url->fragment);
+ if (hash) {
+ if (hash[1]) {
+ url->fragment = g_strdup (hash + 1);
+ camel_url_decode (url->fragment);
+ }
} else
end = url_string + strlen (url_string);