diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-10-05 23:49:41 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-10-05 23:49:41 -0400 |
commit | a4c1e537b0cb2540535357d880e46f63b38c134f (patch) | |
tree | c9fafc32d0c9d2c37ba608b98ab76908d8850d8b /strings.cpp | |
parent | bc1335ebbf68c805a19303469bb49759296a645f (diff) |
graph edits; arch rework
Diffstat (limited to 'strings.cpp')
-rw-r--r-- | strings.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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; } |