diff options
Diffstat (limited to 'fm.c')
| -rw-r--r-- | fm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -217,11 +217,11 @@ void fm_draw_entries(window *window, file_list *list, size_t cursor, int top, wclear(window->win); - for (int i = top; i < bottom && i < list->count; i++) { + for (int i = top; i < bottom && (size_t)i < list->count; i++) { int y = i - top; int color = 0; - if (i == cursor) + if ((size_t)i == cursor) color = COLOR_PAIR_FM_HL; else if (list->items[i].is_dir) color = COLOR_PAIR_FM_DIR; @@ -247,7 +247,7 @@ void fm_entries_scroll(fm_info *info, int n) if (info->cursor < 0) info->cursor = 0; - if (info->cursor >= info->cur->count) + if ((size_t)info->cursor >= info->cur->count) info->cursor = info->cur->count - 1; int win_height = info->bottom - info->top; |
