1
0
forked from GitHub/gf-core

strings are stored as length+text and NULL byte is not a terminator

This commit is contained in:
krangelov
2021-07-30 13:45:22 +02:00
parent a8b3537184
commit 17629e4821
6 changed files with 44 additions and 6 deletions

View File

@@ -181,7 +181,7 @@ Namespace<V> namespace_insert(Namespace<V> map, ref<V> value) {
if (map == 0)
return Node<V>::new_node(value);
int cmp = strcmp(value->name,map->value->name);
int cmp = textcmp(value->name,map->value->name);
if (cmp < 0)
return Node<V>::balanceL(map->value,
namespace_insert(map->left, value),map->right);