Browse Source

bugfix hl_remove_root

Nicolas Cannasse 8 years ago
parent
commit
6983d8f18e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/alloc.c

+ 1 - 1
src/alloc.c

@@ -188,7 +188,7 @@ HL_PRIM void hl_remove_root( void *v ) {
 	for(i=0;i<gc_roots_count;i++)
 		if( gc_roots[i] == (void**)v ) {
 			gc_roots_count--;
-			memmove(gc_roots + i, gc_roots + (i+1), gc_roots_count - i);
+			memmove(gc_roots + i, gc_roots + (i+1), (gc_roots_count - i) * sizeof(void*));
 			break;
 		}
 }