소스 검색

bugfix hl_remove_root

Nicolas Cannasse 8 년 전
부모
커밋
6983d8f18e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;
 		}
 }