mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	fixed a possible crash in ghostmove
This commit is contained in:
		
							
								
								
									
										2
									
								
								game.cpp
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								game.cpp
									
									
									
									
									
								
							| @@ -856,7 +856,7 @@ bool ghostmove(eMonster m, cell* to, cell* from) { | |||||||
|   if((m == moWitchGhost || m == moWitchWinter) && to->land != laPower) |   if((m == moWitchGhost || m == moWitchWinter) && to->land != laPower) | ||||||
|     return false; |     return false; | ||||||
|   if(isGhost(m)) |   if(isGhost(m)) | ||||||
|     for(int i=0; i<to->type; i++) { |     for(int i=0; i<to->type; i++) if(to->move(i)) { | ||||||
|       if(inmirror(to->move(i))) return false; |       if(inmirror(to->move(i))) return false; | ||||||
|       if(to->move(i) && to->move(i) != from && isGhost(to->move(i)->monst) && |       if(to->move(i) && to->move(i) != from && isGhost(to->move(i)->monst) && | ||||||
|         (to->move(i)->monst == moFriendlyGhost) == (m== moFriendlyGhost)) |         (to->move(i)->monst == moFriendlyGhost) == (m== moFriendlyGhost)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue