diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2025-12-13 12:28:31 -0500 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-12-13 12:28:31 -0500 |
| commit | ac02d07cc2bf844ba0255bf309a19f96553b8004 (patch) | |
| tree | a63c08d6e0b1fae1e3014faa0908c8d8661822e7 | |
| parent | f414397519cf4ccb485a65c0fe931c2e0c6f722b (diff) | |
Diffstat (limited to '')
| -rw-r--r-- | kernel/drivers/vga_text_buffer.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/drivers/vga_text_buffer.c b/kernel/drivers/vga_text_buffer.c index 236d8c7..47ccb76 100644 --- a/kernel/drivers/vga_text_buffer.c +++ b/kernel/drivers/vga_text_buffer.c @@ -16,18 +16,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdbool.h> -#include <stddef.h> -#include <stdint.h> - #include <common.h> - +#include <drivers/vga_text_buffer.h> +#include <kernel/halt.h> +#include <kernel/io.h> #include <libk/stdio.h> #include <libk/string.h> - -#include <kernel/io.h> - -#include <drivers/vga_text_buffer.h> +#include <stdbool.h> +#include <stddef.h> +#include <stdint.h> static uint16_t *l_buffer = (uint16_t *) 0xB8000; static uint8_t l_row = 0; @@ -87,6 +84,9 @@ vgatb_write_string(const char *string) void vgatb_printf(const char *string, ...) { + if (strlen(string) >= 256) + ASSERT_NOT_REACHED(); + /* TODO: Dynamic Memory Allocation */ char str[256]; |
