summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorportix <none@none>2012-10-23 01:00:42 +0200
committerportix <none@none>2012-10-23 01:00:42 +0200
commit1bf336e63e1c46a3005d1e4d555d294dd45a9af0 (patch)
treeb55d987a4a31a07701a5f52c6b9fb5ad0dd553ae /src/util.c
parent371935c5857ff7440f2fd1e29d28c1bd2918e7cf (diff)
downloaddwb-1bf336e63e1c46a3005d1e4d555d294dd45a9af0.zip
Fixing element hider issues with webkit-1.10
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index f7db654e..23974ddf 100644
--- a/src/util.c
+++ b/src/util.c
@@ -612,8 +612,8 @@ util_domain_from_uri(const char *uri) {
if ( (p = strstr(uri, "://")) ) {
uri_p = p + 3;
}
- if ( (p = strchr(uri_p, '/')) ) {
- strncpy(domain, uri_p, MIN(p - uri_p, sizeof(domain)));
+ if ( (p = strchr(uri_p, '/')) != NULL ) {
+ strncpy(domain, uri_p, MIN((unsigned int)(p - uri_p), sizeof(domain)));
}
char *ret = domain[0] ? domain : uri_p;
return g_strdup(ret);