From 5a61a852019ea9b6e38dc5eec6692368bcb9d530 Mon Sep 17 00:00:00 2001 From: "mo@ilaven.net" Date: Thu, 11 Dec 2008 00:32:00 +0000 Subject: [PATCH] Fix mis-parsing of local file:/// IRIs. git-svn-id: http://libiri.googlecode.com/svn/trunk@7 68b1170a-6346-0410-b79c-01ab32b2924b --- libiri/parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libiri/parse.c b/libiri/parse.c index 368e841..2213afd 100644 --- a/libiri/parse.c +++ b/libiri/parse.c @@ -146,12 +146,13 @@ iri_parse(const char *src) bufp++; src++; /* src[0-1] SHOULD == '/' */ - for(; *src == '/'; src++); + if(src[0] == '/') src++; + if(src[0] == '/') src++; } else if(colon && at && colon < at) { /* This could be scheme://user[;auth][:password]@host or [scheme:]user[;auth][:password]@host (urgh) */ - if(colon[1] == '/') + if(colon[1] == '/' && colon[2] != '/') { p->iri.scheme = bufp; while(*src && *src != ':') -- 2.7.4