From 7bc58226a529293c42e82eba3b37eecf7f5978c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 4 Mar 2019 18:31:00 +0100 Subject: set-attr! can now add new keys. --- trie.inc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'trie.inc.h') diff --git a/trie.inc.h b/trie.inc.h index 20cc93b5..ffc8ac8e 100644 --- a/trie.inc.h +++ b/trie.inc.h @@ -88,6 +88,8 @@ TYPE* GET(TRIE(TYPE)) ( TRIE(TYPE)* trie, char* key ) { while (n != NULL) { if (subkey[1] == '\0') { + /* Wanted node found, + * value can however be NULL */ return n->value; } else if (subkey[0] == n->c) { n = n->child; @@ -97,7 +99,7 @@ TYPE* GET(TRIE(TYPE)) ( TRIE(TYPE)* trie, char* key ) { } } - ERR("Position not found"); + /* Position not found */ return 0; } -- cgit v1.2.3