Commit a948f096 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Jean-Baptiste Kempf

Fix VLC_CLIP usage (and potential divisions by zero)

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e5beadb8
......@@ -501,8 +501,8 @@ static int Open( vlc_object_t *p_this )
p_sys->a_0 = p_sys->bz_begin;
/* */
p_sys->i_col = VLC_CLIP( COL_MAX, 1, p_sys->i_col );
p_sys->i_row = VLC_CLIP( ROW_MAX, 1, p_sys->i_row );
p_sys->i_col = VLC_CLIP( p_sys->i_col, 1, COL_MAX );
p_sys->i_row = VLC_CLIP( p_sys->i_row, 1, ROW_MAX );
msg_Dbg( p_splitter, "opening a %i x %i wall",
p_sys->i_col, p_sys->i_row );
......
......@@ -137,10 +137,10 @@ static int Open( vlc_object_t *p_this )
/* */
p_sys->i_col = var_CreateGetInteger( p_splitter, CFG_PREFIX "cols" );
p_sys->i_col = VLC_CLIP( COL_MAX, 1, p_sys->i_col );
p_sys->i_col = VLC_CLIP( p_sys->i_col, 1, COL_MAX );
p_sys->i_row = var_CreateGetInteger( p_splitter, CFG_PREFIX "rows" );
p_sys->i_row = VLC_CLIP( ROW_MAX, 1, p_sys->i_row );
p_sys->i_row = VLC_CLIP( p_sys->i_row, 1, ROW_MAX );
msg_Dbg( p_splitter, "opening a %i x %i wall",
p_sys->i_col, p_sys->i_row );
......
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