]> git.mdlowis.com Git - projs/libcds.git/commitdiff
fixed bad cast
authorMichael D. Lowis <mike@mdlowis.com>
Sun, 24 May 2015 13:28:39 +0000 (09:28 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Sun, 24 May 2015 13:28:39 +0000 (09:28 -0400)
source/rbt/rbt.c

index bb1f112660137aedd2223cbe4e0e42d4aba5ff5d..96876590fa0d71c6db7dab856998be6ca2a5827e 100644 (file)
@@ -6,8 +6,8 @@
 
 //nodes are compared by memory address by default
 static int rbt_default_compare(void* env, void* v_a, void* v_b){
-    uintptr_t a = (intptr_t)v_a;
-    uintptr_t b = (intptr_t)v_b;
+    uintptr_t a = (uintptr_t)v_a;
+    uintptr_t b = (uintptr_t)v_b;
     (void)env;
     return (a == b ? 0 : (a<b ? -1 : 1 ));
 }