1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-03-22 19:37:04 +00:00

fixed some memory bugs

This commit is contained in:
Zeno Rogue 2019-03-09 01:18:47 +01:00
parent 497f7f6c0f
commit ebbaa3fcc3
4 changed files with 4 additions and 2 deletions

View File

@ -380,6 +380,7 @@ struct hrmap_archimedean : hrmap {
origin->rval0 = origin->rval1 = 0;
origin->cdata = NULL;
origin->alt = NULL;
origin->c7 = NULL;
origin->distance = 0;
parent_index_of(origin) = DUAL ? 1 : 0;

View File

@ -314,7 +314,7 @@ void clearfrom(heptagon *at) {
}
}
int edges = at->degree();
if(binarytiling) edges = at->c7->type;
if(binarytiling && DIM == 2) edges = at->c7->type;
for(int i=0; i<edges; i++) if(at->move(i)) {
if(at->move(i)->alt != &deletion_marker)
q.push(at->move(i));

View File

@ -572,6 +572,7 @@ namespace euclid3 {
h->c7 = newCell(S7, h);
h->distance = 0;
h->cdata = NULL;
h->alt = NULL;
auto co = getcoord(at);
if(S7 != 14)
h->zebraval = gmod(co[0] + co[1] * 2 + co[2] * 4, 5);

View File

@ -320,7 +320,7 @@ namespace reg3 {
~hrmap_reg3() {
if(binary_map) {
dynamicval<eGeometry> g(geometry, gBinary3);
// delete binary_map;
delete binary_map;
}
clearfrom(origin);
}