Meh, no (null) it's empty if it's empty.

This commit is contained in:
Jari Vetoniemi 2014-04-12 20:51:32 +03:00
parent bfc53136c8
commit 6692f73c5c

View File

@ -196,7 +196,7 @@ static void _bmDrawCursesRender(const bmMenu *menu)
for (i = (menu->index / (lines - 1)) * (lines - 1); i < itemsCount && cl < lines; ++i) { for (i = (menu->index / (lines - 1)) * (lines - 1); i < itemsCount && cl < lines; ++i) {
int highlighted = (items[i] == bmMenuGetHighlightedItem(menu)); int highlighted = (items[i] == bmMenuGetHighlightedItem(menu));
int color = (highlighted ? 2 : (_bmMenuItemIsSelected(menu, items[i]) ? 1 : 0)); int color = (highlighted ? 2 : (_bmMenuItemIsSelected(menu, items[i]) ? 1 : 0));
_bmDrawCursesDrawLine(color, cl++, "%s%s", (highlighted ? ">> " : " "), (items[i]->text ? items[i]->text : "(null)")); _bmDrawCursesDrawLine(color, cl++, "%s%s", (highlighted ? ">> " : " "), (items[i]->text ? items[i]->text : ""));
} }
unsigned int ncols = curses.getmaxx(curses.stdscr) - titleLen - 1; unsigned int ncols = curses.getmaxx(curses.stdscr) - titleLen - 1;