From a4c1e537b0cb2540535357d880e46f63b38c134f Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Wed, 5 Oct 2022 23:49:41 -0400 Subject: graph edits; arch rework --- strings.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'strings.cpp') diff --git a/strings.cpp b/strings.cpp index 6caedd0..b8560d1 100644 --- a/strings.cpp +++ b/strings.cpp @@ -23,14 +23,15 @@ CopyStrings(void *Dest, void *Data) } } -static void * -String_GenerateFromChar(memory *Memory, char *Char) +static uint16 +String_AddToFile(memory *Memory, char *Char) { - void *Address = AllocateMemory(Memory, STRING_SIZE, F_Strings); + uint16 FileIndex = Memory_Block_AllocateNew(Memory, F_Strings); + void *Address = Memory_Block_AddressAtIndex(Memory, F_Strings, FileIndex); uint16 i = 0; while (Char[i] != '\0') { *((char *)Address + i) = Char[i]; i++; } - return Address; + return FileIndex; } -- cgit v1.2.3