From: Steve Lhomme Date: Wed, 18 Sep 2024 10:57:04 +0000 (+0200) Subject: lua: don't use | operator on VLC errors X-Git-Tag: archive/raspbian/3.0.21-9+rpi1^2~70 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=59fb26fb7ca42a1f4bb18effec4bc09170586ff6;p=vlc.git lua: don't use | operator on VLC errors This could end up with unknown/invalid error values. (cherry picked from commit 586b28f4aab1f936d666bd3dab7904793c3012d7) Gbp-Pq: Name 0056-lua-don-t-use-operator-on-VLC-errors.patch --- diff --git a/modules/lua/extension.c b/modules/lua/extension.c index cc6bffc8..c8bfe223 100644 --- a/modules/lua/extension.c +++ b/modules/lua/extension.c @@ -971,7 +971,10 @@ int lua_ExecuteFunctionVa( extensions_manager_t *p_mgr, extension_t *p_ext, i_ret = VLC_EGENERIC; } - i_ret |= lua_DialogFlush( L ); + if (i_ret != VLC_SUCCESS) + lua_DialogFlush( L ); + else + i_ret = lua_DialogFlush( L ); exit: return i_ret; @@ -1013,7 +1016,10 @@ int lua_ExtensionTriggerMenu( extensions_manager_t *p_mgr, i_ret = VLC_EGENERIC; } - i_ret |= lua_DialogFlush( L ); + if (i_ret != VLC_SUCCESS) + lua_DialogFlush( L ); + else + i_ret = lua_DialogFlush( L ); if( i_ret < VLC_SUCCESS ) { msg_Dbg( p_mgr, "Something went wrong in %s (%s:%d)",