Fix GET_CHOICES macro

SVN revision: 65286
This commit is contained in:
Mike McCormack 2011-11-16 06:19:00 +00:00
parent 692fc0d40d
commit c6d30ee9da
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ typedef struct _Elm_Params_Entry
#define CHOICE_GET(CHOICES, STR) \
unsigned int i; \
for (i = 0; i < sizeof(CHOICES); i++) \
if (strcmp(STR, CHOICES[i]) == 0) \
for (i = 0; i < sizeof(CHOICES)/sizeof (CHOICES)[0]; i++) \
if (strcmp((STR), (CHOICES)[i]) == 0) \
return i