diff --git a/examples/slm.c b/examples/slm.c index a6e9dae..2416ba9 100644 --- a/examples/slm.c +++ b/examples/slm.c @@ -82,7 +82,7 @@ sprintf_slex_node(slex_node_t *node, char *buf) * extract data from within your nodes. */ SKIPLIST_KV_ACCESS( - slex, api_, int, char *, + slex, api_, key, int, value, char *, /* query blk */ { query.key = key; }, /* return blk */ { return node->value; }) @@ -179,7 +179,7 @@ shuffle(int *array, size_t n) } } -#define TEST_ARRAY_SIZE 5 +#define TEST_ARRAY_SIZE 8 int main() diff --git a/include/sl.h b/include/sl.h index 789ff0c..6fd417b 100644 --- a/include/sl.h +++ b/include/sl.h @@ -1474,7 +1474,7 @@ } \ if (fn) { \ fn(node, buf); \ - fprintf(os, " \u219F %zu \u226B %s \"\n", node->field.sle.height, buf); \ + fprintf(os, " \u219F %zu \u226B %s \"\n", node->field.sle.height + 1, buf); \ } else { \ fprintf(os, " \u219F %zu \"\n", node->field.sle.height); \ } \