git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10965
d7cf8633-e32d-0410-b094-
e92efae38249
}
// allocate buffers for the produced and temporary data
}
// allocate buffers for the produced and temporary data
- bihmaxnodes = bihnumleafs - 1;
+ bihmaxnodes = bihnumleafs + 1;
bihnodes = (bih_node_t *)Mem_Alloc(loadmodel->mempool, sizeof(bih_node_t) * bihmaxnodes);
temp_leafsort = (int *)Mem_Alloc(loadmodel->mempool, sizeof(int) * bihnumleafs * 2);
temp_leafsortscratch = temp_leafsort + bihnumleafs;
bihnodes = (bih_node_t *)Mem_Alloc(loadmodel->mempool, sizeof(bih_node_t) * bihmaxnodes);
temp_leafsort = (int *)Mem_Alloc(loadmodel->mempool, sizeof(int) * bihnumleafs * 2);
temp_leafsortscratch = temp_leafsort + bihnumleafs;