aboutsummaryrefslogtreecommitdiffstats
path: root/fm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fm.c')
-rw-r--r--fm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fm.c b/fm.c
index a4a9c3d..a395de9 100644
--- a/fm.c
+++ b/fm.c
@@ -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;