diff options
author | wm4 <wm4@nowhere> | 2013-12-22 23:05:12 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-22 23:25:10 +0100 |
commit | 8c0675b7d051393680d974a5bcf189e25a911ad1 (patch) | |
tree | f1287d0e4a340ed5b504043e9bc6242be6d05877 | |
parent | 3782fa20edcd3e4bdbbfa5ffbd430449b97c009a (diff) | |
download | mpv-8c0675b7d051393680d974a5bcf189e25a911ad1.tar.bz2 mpv-8c0675b7d051393680d974a5bcf189e25a911ad1.tar.xz |
path: don't accept empty protocol as valid
mp_is_url("://") returned true.
-rw-r--r-- | options/path.c | 2 |
1 files changed, 1 insertions, 1 deletions
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++) { |