Fix operator precedence problem reported by dcb314. The first definition of STRLEN_MITEMS lacked outer parentheses, so was bound in an unexpected way when used in an arithmetic expression.
1 files changed, 3 insertions(+), 3 deletions(-) M Menu.C
M Menu.C +3 -3
@@ 24,10 24,10 @@ unsigned long Menu::m_border; Window *Menu::m_window; #if MENU_ENTRY_MAXLENGTH > 0 -#define STRLEN_MITEMS(i) (strlen(m_items[(i)]) > MENU_ENTRY_MAXLENGTH) ? \ - MENU_ENTRY_MAXLENGTH : strlen(m_items[(i)]) +#define STRLEN_MITEMS(i) ((strlen(m_items[(i)]) > MENU_ENTRY_MAXLENGTH) ? \ + MENU_ENTRY_MAXLENGTH : strlen(m_items[(i)])) #else -#define STRLEN_MITEMS(i) strlen(m_items[(i)]) +#define STRLEN_MITEMS(i) (strlen(m_items[(i)])) #endif