mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 05:23:00 +00:00 
			
		
		
		
	fixed some memory bugs
This commit is contained in:
		| @@ -380,6 +380,7 @@ struct hrmap_archimedean : hrmap { | |||||||
|     origin->rval0 = origin->rval1 = 0; |     origin->rval0 = origin->rval1 = 0; | ||||||
|     origin->cdata = NULL; |     origin->cdata = NULL; | ||||||
|     origin->alt = NULL; |     origin->alt = NULL; | ||||||
|  |     origin->c7 = NULL; | ||||||
|     origin->distance = 0; |     origin->distance = 0; | ||||||
|  |  | ||||||
|     parent_index_of(origin) = DUAL ? 1 : 0; |     parent_index_of(origin) = DUAL ? 1 : 0; | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								cell.cpp
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								cell.cpp
									
									
									
									
									
								
							| @@ -314,7 +314,7 @@ void clearfrom(heptagon *at) { | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     int edges = at->degree(); |     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)) { |     for(int i=0; i<edges; i++) if(at->move(i)) { | ||||||
|       if(at->move(i)->alt != &deletion_marker) |       if(at->move(i)->alt != &deletion_marker) | ||||||
|         q.push(at->move(i));     |         q.push(at->move(i));     | ||||||
|   | |||||||
| @@ -572,6 +572,7 @@ namespace euclid3 { | |||||||
|         h->c7 = newCell(S7, h); |         h->c7 = newCell(S7, h); | ||||||
|         h->distance = 0; |         h->distance = 0; | ||||||
|         h->cdata = NULL; |         h->cdata = NULL; | ||||||
|  |         h->alt = NULL; | ||||||
|         auto co = getcoord(at); |         auto co = getcoord(at); | ||||||
|         if(S7 != 14) |         if(S7 != 14) | ||||||
|           h->zebraval = gmod(co[0] + co[1] * 2 + co[2] * 4, 5); |           h->zebraval = gmod(co[0] + co[1] * 2 + co[2] * 4, 5); | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								reg3.cpp
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								reg3.cpp
									
									
									
									
									
								
							| @@ -320,7 +320,7 @@ namespace reg3 { | |||||||
|     ~hrmap_reg3() { |     ~hrmap_reg3() { | ||||||
|       if(binary_map) {         |       if(binary_map) {         | ||||||
|         dynamicval<eGeometry> g(geometry, gBinary3); |         dynamicval<eGeometry> g(geometry, gBinary3); | ||||||
|         // delete binary_map; |         delete binary_map; | ||||||
|         } |         } | ||||||
|       clearfrom(origin); |       clearfrom(origin); | ||||||
|       } |       } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue