From a942782e4721287f0469aee68ab3bd87c61d37fe Mon Sep 17 00:00:00 2001 From: PreacherDHM Date: Tue, 18 Feb 2025 23:03:07 -0800 Subject: [PATCH] added cstring mostly --- source/tart.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/tart.c b/source/tart.c index 9b42802..7b2037c 100644 --- a/source/tart.c +++ b/source/tart.c @@ -131,6 +131,10 @@ tart_byte tart_add_cells_to_buffer(struct tart_buffer* buffer, struct tart_cell* struct tart_cstring tart_cstring(char *string, long size, struct tart_cell type){ struct tart_cstring str = {0,size}; str.data = malloc(size * sizeof(struct tart_cell)); + for(int i = 0; i < size; i++) { + str.data[i] = type; + str.data[i].display = string[i]; + } return str; }