summaryrefslogtreecommitdiff
path: root/strings.cpp
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2022-10-06 14:30:48 -0400
committerFox Caminiti <fox@foxcam.net>2022-10-06 14:30:48 -0400
commit0b0aa3b06fac0bcdeb31d5e2211d1ba149531692 (patch)
tree91f0d9689151b7fb985de50b2c8b12ccd7a65440 /strings.cpp
parenta4c1e537b0cb2540535357d880e46f63b38c134f (diff)
GL renderer preparation
Diffstat (limited to 'strings.cpp')
-rw-r--r--strings.cpp6
1 files changed, 4 insertions, 2 deletions
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;