summaryrefslogtreecommitdiff
path: root/strings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'strings.cpp')
-rw-r--r--strings.cpp9
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;
}