[vlc-commits] lua: do not push uninitialized values on poll() error
Rémi Denis-Courmont
git at videolan.org
Sat Jan 2 17:49:28 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 2 18:48:48 2016 +0200| [be5c27fe72ea622132eb5923a6cf1c4e008c55ed] | committer: Rémi Denis-Courmont
lua: do not push uninitialized values on poll() error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=be5c27fe72ea622132eb5923a6cf1c4e008c55ed
---
modules/lua/libs/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/lua/libs/net.c b/modules/lua/libs/net.c
index 3d760bf..3d8fb51 100644
--- a/modules/lua/libs/net.c
+++ b/modules/lua/libs/net.c
@@ -367,7 +367,7 @@ static int vlclua_net_poll( lua_State *L )
for( int i = 0; i < i_fds; i++ )
{
lua_pushinteger( L, luafds[i] );
- lua_pushinteger( L, p_fds[i].revents );
+ lua_pushinteger( L, (val >= 0) ? p_fds[i].revents : 0 );
lua_settable( L, 1 );
}
lua_pushinteger( L, val );
More information about the vlc-commits
mailing list