From 8c0675b7d051393680d974a5bcf189e25a911ad1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 22 Dec 2013 23:05:12 +0100 Subject: path: don't accept empty protocol as valid mp_is_url("://") returned true. --- options/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'options/path.c') diff --git a/options/path.c b/options/path.c index 304f009167..d38aa060af 100644 --- a/options/path.c +++ b/options/path.c @@ -219,7 +219,7 @@ bool mp_path_isdir(const char *path) bool mp_is_url(bstr path) { int proto = bstr_find0(path, "://"); - if (proto < 0) + if (proto < 1) return false; // The protocol part must be alphanumeric, otherwise it's not an URL. for (int i = 0; i < proto; i++) { -- cgit v1.2.3