|  | @@ -166,9 +166,14 @@ impl Engine {
 | 
	
		
			
				|  |  |      fn reconstruct_pv(game: &Game, hash: &Cache) -> Vec<Move> {
 | 
	
		
			
				|  |  |          let mut pv: Vec<Move> = Vec::new();
 | 
	
		
			
				|  |  |          let mut g = game.clone();
 | 
	
		
			
				|  |  | -        loop {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // max 100 to avoid infinite loops
 | 
	
		
			
				|  |  | +        for _ in 0..100 {
 | 
	
		
			
				|  |  |              let mce = hash.lookup(&g);
 | 
	
		
			
				|  |  |              if let Some(ce) = mce {
 | 
	
		
			
				|  |  | +                if ce.mov == Move::Nullmove {
 | 
	
		
			
				|  |  | +                    break;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |                  pv.push(ce.mov);
 | 
	
		
			
				|  |  |                  g.apply(ce.mov);
 | 
	
		
			
				|  |  |              }
 |