summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTails developers <tails@boum.org>2012-10-13 16:06:15 +0000
committerShaun McCance <shaunm@gnome.org>2012-11-21 10:34:02 -0500
commitb617a61287862c909b6819173bdac4e0c419667a (patch)
tree43e2924bb73d02ec6215cbfff4f7929414e88e1e
parent22ce877d810020ae69dd1509a4a5d3c3b55836d0 (diff)
downloadyelp-b617a61287862c909b6819173bdac4e0c419667a.tar.gz
Fix handling of xref links with anchors in resolve_file_path()
https://bugzilla.gnome.org/show_bug.cgi?id=686095
-rw-r--r--libyelp/yelp-uri.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index e53062a8..be23df2c 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -562,7 +562,7 @@ resolve_file_path (YelpUri *uri)
YelpUriPrivate *base_priv = NULL;
YelpUriPrivate *priv = GET_PRIV (uri);
gchar *path;
- const gchar *hash = strchr (priv->res_arg, '#');
+ const gchar *hash;
/* Treat xref: URIs like relative file paths */
if (g_str_has_prefix (priv->res_arg, "xref:")) {
@@ -574,6 +574,7 @@ resolve_file_path (YelpUri *uri)
if (priv->res_base)
base_priv = GET_PRIV (priv->res_base);
+ hash = strchr (priv->res_arg, '#');
if (hash) {
path = g_strndup (priv->res_arg, hash - priv->res_arg);
hash++;