diff --git a/kaleid/kernel/io/vga.c b/kaleid/kernel/io/vga.c index d272985..3254410 100644 --- a/kaleid/kernel/io/vga.c +++ b/kaleid/kernel/io/vga.c @@ -47,7 +47,7 @@ error_t bvgaflusher(Buffer_t *buf) uchar *bufStart = (uchar *)lmax((size_t)buf->buf, (size_t)currentLine - (buf->nLines - 2 + bscroll) * buf->lineLen); - + uchar *ptr = bufStart; // Writes the buffer's content @@ -88,7 +88,7 @@ void IoScrollDown(void) void IoScrollUp(void) { // Keep the 8 below the 10 given to BOpenTermBufEx - if (bscroll < BtVideoInfo.framebufferHeight * 8) + if (bscroll < BtVideoInfo.framebufferHeight * 8 && bscroll < BStdOut->nLines) bscroll++; bvgaflusher(BStdOut); }