]> git.sesse.net Git - vlc/commitdiff
zsh: really use the arguments given to the zsh generator.
authorRémi Duraffort <ivoire@videolan.org>
Sun, 3 Jan 2010 17:27:09 +0000 (18:27 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 3 Jan 2010 23:20:32 +0000 (00:20 +0100)
extras/analyser/zsh.cpp

index e5b10fa9f14c57aaca86e40de2f43e4733d494db..880ef7713dff8c2b386f9440e2ff0f9033e2eabd 100644 (file)
@@ -60,8 +60,11 @@ int main( int i_argc, const char **ppsz_argv )
     libvlc_exception_t ex;
     libvlc_exception_init(&ex);
 
-    const char * const argv[] = { "vlc" };
-    libvlc_instance_t *p_libvlc_instance = libvlc_new(1, argv, &ex);
+    const char *argv[i_argc + 1];
+    argv[0] = "vlc";
+    for( int i = 0; i < i_argc; i++ )
+        argv[i+1] = ppsz_argv[i];
+    libvlc_instance_t *p_libvlc_instance = libvlc_new(i_argc+1, argv, &ex);
 
     if( !p_libvlc_instance || libvlc_exception_raised(&ex) )
     {