diff options
Diffstat (limited to 'strings.cpp')
-rw-r--r-- | strings.cpp | 6 |
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; |