Mercurial > mplayer.hg
changeset 32938:29ce708287dd
Reduce item arrays to reasonable size.
The current maximum of items used in skins is 46 (for main), 27 (for bar)
and 15 (for menu), so 64 seems to be a reasonable value.
The symbolic constant will allow to check for out-of-bounds array access later
(which currently isn't performed) and issue an appropriate error message.
author | ib |
---|---|
date | Fri, 04 Mar 2011 13:58:48 +0000 |
parents | 3c57056637cc |
children | 26bbfa0249e0 |
files | gui/app.h |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/app.h Fri Mar 04 12:50:21 2011 +0000 +++ b/gui/app.h Fri Mar 04 13:58:48 2011 +0000 @@ -130,6 +130,10 @@ #define btnReleased 1 #define btnPressed 2 +// Item definition + +#define MAX_ITEMS 64 + typedef struct { int type; @@ -177,13 +181,13 @@ int menuIsPresent; int IndexOfMainItems; - wItem mainItems[256]; + wItem mainItems[MAX_ITEMS]; int IndexOfBarItems; - wItem barItems[256]; + wItem barItems[MAX_ITEMS]; int IndexOfMenuItems; - wItem menuItems[64]; + wItem menuItems[MAX_ITEMS]; } guiItems; extern guiItems appMPlayer;