vlc | branch: master | Francois Cartegnie <[email protected]> | Tue Aug 21 19:57:58 2012 +0200| [4be9fdff0f8279cb1164b12bf169beda4158a331] | committer: Francois Cartegnie
media_library: fix selecting union member / update arguments. ml_AttributeIsString() defines String as 1 and Integer as 0. The switch/case was just doing the opposite... > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4be9fdff0f8279cb1164b12bf169beda4158a331 --- src/misc/media_library.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc/media_library.c b/src/misc/media_library.c index df20528..18679ef 100644 --- a/src/misc/media_library.c +++ b/src/misc/media_library.c @@ -213,16 +213,16 @@ int ml_UpdateSimple( media_library_t *p_media_library, "this argument is invalid for Update: %d", (int)sel ); #endif - i_ret = VLC_EGENERIC; + i_ret = VLC_EBADVAR; } else if( sel == ML_END ) vlc_array_append( array, update ); break; - case 0: + case 1: update->value.str = va_arg( args, char* ); vlc_array_append( array, update ); break; - case 1: + case 0: update->value.i = va_arg( args, int ); vlc_array_append( array, update ); break; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
