aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/archetype/linked_list.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/archetype/linked_list.cpp')
-rw-r--r--engines/glk/archetype/linked_list.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/glk/archetype/linked_list.cpp b/engines/glk/archetype/linked_list.cpp
index 90cca17981..bc4719ca48 100644
--- a/engines/glk/archetype/linked_list.cpp
+++ b/engines/glk/archetype/linked_list.cpp
@@ -27,7 +27,11 @@ namespace Glk {
namespace Archetype {
void new_list(ListType &the_list) {
- the_list = new NodeType();
+ the_list = (ListType)malloc(sizeof(NodeType));
+ add_bytes(sizeof(NodeType));
+ the_list->key = 0;
+ the_list->data = nullptr;
+ the_list->next = nullptr;
}
void dispose_list(ListType &the_list) {