Commit 4be9fdff authored by Francois Cartegnie's avatar 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...
parent 8be904ac
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment