terminal: Fix type in loop condition when scrolling up

This commit is contained in:
K. Lange 2019-12-19 16:05:21 +09:00
parent 7299fb7538
commit ded6e4de11

View File

@ -1070,7 +1070,7 @@ static void term_shift_region(int top, int height, int how_much) {
memmove((void*)(dst + i * GFX_W(ctx) * GFX_B(ctx)), (void*)(src + i * GFX_W(ctx) * GFX_B(ctx)), term_width * char_width * GFX_B(ctx));
}
} else {
for (int i = (count - 1) * char_height; i == 0; --i) {
for (int i = (count - 1) * char_height; i >= 0; --i) {
memmove((void*)(dst + i * GFX_W(ctx) * GFX_B(ctx)), (void*)(src + i * GFX_W(ctx) * GFX_B(ctx)), term_width * char_width * GFX_B(ctx));
}
}