From 0b0aa3b06fac0bcdeb31d5e2211d1ba149531692 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Thu, 6 Oct 2022 14:30:48 -0400 Subject: GL renderer preparation --- strings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'strings.cpp') diff --git a/strings.cpp b/strings.cpp index b8560d1..ab410b2 100644 --- a/strings.cpp +++ b/strings.cpp @@ -27,10 +27,12 @@ static uint16 String_AddToFile(memory *Memory, char *Char) { uint16 FileIndex = Memory_Block_AllocateNew(Memory, F_Strings); - void *Address = Memory_Block_AddressAtIndex(Memory, F_Strings, FileIndex); + block_string *String = (block_string *)Memory_Block_AddressAtIndex(Memory, F_Strings, FileIndex); + History_Action_Block_Swap(Memory, F_Strings, String); + String->Occupied = 1; uint16 i = 0; while (Char[i] != '\0') { - *((char *)Address + i) = Char[i]; + String->Char[i] = Char[i]; i++; } return FileIndex; -- cgit v1.2.3