From 91f9331ee0c139a34cd85abb943e14ae1821bc6d Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 10 Sep 2017 20:54:02 +1000 Subject: [PATCH] Why isn't it working??? --- utils/magiedit/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/magiedit/main.c b/utils/magiedit/main.c index 937d17d..1c47c22 100644 --- a/utils/magiedit/main.c +++ b/utils/magiedit/main.c @@ -410,12 +410,12 @@ char *message_editor() { top_of_screen--; } - od_set_cursor(position_y - 1 - top_of_screen + 5, 1); + od_set_cursor(position_y - top_of_screen + 5, 1); od_printf("%s", line); od_clr_line(); - if (position_y <= body_line_count) { - for (i=position_y; i< body_line_count && i < top_of_screen + 17;i++) { + if (position_y + 1 <= body_line_count) { + for (i=position_y + 1; i< body_line_count && i < top_of_screen + 17;i++) { od_set_cursor(i - top_of_screen + 5, 1); od_printf("%s", body_lines[i]); od_clr_line();