mirror of
https://github.com/mpv-player/mpv
synced 2025-02-25 09:44:21 +00:00
path: don't accept empty protocol as valid
mp_is_url("://") returned true.
This commit is contained in:
parent
3782fa20ed
commit
8c0675b7d0
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user