From 14b33ae9c00f74a24a00aaece88b22af0955379e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 4 Feb 2019 18:23:51 +0100 Subject: Fix most memmory errors. --- trie.inc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'trie.inc.h') diff --git a/trie.inc.h b/trie.inc.h index 14362058..8a817ab6 100644 --- a/trie.inc.h +++ b/trie.inc.h @@ -46,7 +46,7 @@ int TRIE_PUT(TYPE) ( TRIE(TYPE)* trie, char* key, TYPE* val ) { last->child = t; last = t; } - RESOLVE(TYPE)(&last->value, val); + last->value = RESOLVE(TYPE)(last->value, val); // last->value = val; return 0; } else if (cur->c == subkey[0]) { @@ -58,7 +58,7 @@ int TRIE_PUT(TYPE) ( TRIE(TYPE)* trie, char* key, TYPE* val ) { } else if (subkey[0] == '\0') { /* Key finished */ // last->value = val; - RESOLVE(TYPE)(&last->value, val); + last->value = RESOLVE(TYPE)(last->value, val); return 0; } else if (cur->next != NULL) { /* This node was not part of the set, but it's sibling might */ -- cgit v1.2.3