]> git.sesse.net Git - vlc/commitdiff
make_URI(Win32): rather default to "file" than format a wrong uri
authorErwan Tulou <erwan10@videolan.org>
Tue, 20 Jul 2010 14:56:32 +0000 (16:56 +0200)
committerErwan Tulou <erwan10@videolan.org>
Tue, 20 Jul 2010 15:06:58 +0000 (17:06 +0200)
src/text/strings.c

index cd110e73325ce6b56266b2d573c2818067c5e2a2..25886ff045ea889f3feb48ead457088efc5e91db 100644 (file)
@@ -1054,7 +1054,7 @@ char *make_URI (const char *path, const char *scheme)
 #ifdef WIN32
     if (isalpha (path[0]) && (path[1] == ':'))
     {
-        if (asprintf (&buf, "%s:///%c:", scheme, path[0]) == -1)
+        if (asprintf (&buf, "%s:///%c:", scheme ? scheme : "file", path[0]) == -1)
             buf = NULL;
         path += 2;
     }