diff --git a/utils/magiedit/main.c b/utils/magiedit/main.c index e182101..1181334 100644 --- a/utils/magiedit/main.c +++ b/utils/magiedit/main.c @@ -372,7 +372,7 @@ char *message_editor() { } else { // check if current line fits - if (73 - strlen(body_lines[position_y - 1]) > strlen(line)) { + if (strlen(body_lines[position_y - 1]) + strlen(line) < 73) { // it fits, move it up to the previous line j = strlen(body_lines[position_y - 1]); @@ -414,9 +414,9 @@ char *message_editor() { od_printf("%s", line); od_clr_line(); - i = position_y; + i = position_y + 1; - if (position_y <= body_line_count) { + if (position_y + 1 <= body_line_count) { for (; 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]);