X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwin32%2Fspecific.c;h=e362e273b29263b3d6313d7982ef8317de9c599a;hb=8c390d9ba7b2915d2f32fa28efe0e4a267717825;hp=c3e3a75c2a71ecb7d09adc5aaa53818cbfb47016;hpb=430c69a6736848eee2032e5af4fc2b88cac18e0e;p=vlc diff --git a/src/win32/specific.c b/src/win32/specific.c index c3e3a75c2a..e362e273b2 100644 --- a/src/win32/specific.c +++ b/src/win32/specific.c @@ -134,7 +134,7 @@ typedef struct char data[]; } vlc_ipc_data_t; -void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] ) +void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_argv[] ) { #if !defined( UNDER_CE ) /* Raise default priority of the current process */ @@ -221,24 +221,24 @@ void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv /* We assume that the remaining parameters are filenames * and their input options */ - if( *pi_argc - 1 >= vlc_optind ) + if( i_argc > 0 ) { COPYDATASTRUCT wm_data; int i_opt; vlc_ipc_data_t *p_data; size_t i_data = sizeof (*p_data); - for( i_opt = vlc_optind; i_opt < *pi_argc; i_opt++ ) + for( i_opt = 0; i_opt < i_argc; i_opt++ ) { i_data += sizeof (size_t); i_data += strlen( ppsz_argv[ i_opt ] ) + 1; } p_data = malloc( i_data ); - p_data->argc = *pi_argc - vlc_optind; + p_data->argc = i_argc; p_data->enqueue = var_InheritBool( p_this, "playlist-enqueue" ); i_data = 0; - for( i_opt = vlc_optind; i_opt < *pi_argc; i_opt++ ) + for( i_opt = 0; i_opt < i_argc; i_opt++ ) { size_t i_len = strlen( ppsz_argv[ i_opt ] ) + 1; /* Windows will never switch to an architecture