Script Freezing Unity

So I was working on a bit of coding, and everything else is working fine, but this one bit of code seems to be causing unity some serious problems, and I don’t know why. I am using the newest unity build, 5.0.2f1 . It’s not even outputting debug.logs (which I removed from here to make it cleaner), it’s just eating up more and more ram as it tries to run. the script is called by pressing a GUI button, and here it is. Before you ask, I’ve done many checks and variations to make sure I’m not doing something stupid like getting caught in an infinite loop. All the values are greater than what I’m trying to subtract from them. To maybe narrow it down, when running the script, if power < OtherPower, it works fine, without freezing.

 void Battle()
 {
	if (power > OtherPower){
		damage = power - OtherPower;
		OtherPower = OtherPower * System.Math.PI;
		}
	if (power < OtherPower) {
			SpawnScript.militia = 0;
			SpawnScript.ManAtArms = 0;
	}
	if (power == OtherPower)
	{
		OtherPower = OtherPower * System.Math.PI;
		SpawnScript.militia = 0;
		SpawnScript.ManAtArms = 0;
	}
	OtherPower = System.Math.Ceiling (OtherPower);
	while (damage >= 1){
			if (damage >= 10 && SpawnScript.ManAtArms > 1){
				SpawnScript.ManAtArms = SpawnScript.ManAtArms - 1;
				damage = damage - 10;
			}

			if (damage >= 1 && SpawnScript.militia > 1){
				SpawnScript.militia = SpawnScript.militia - 1;
				damage = damage - 1;
			}
			if (damage < 1 || power < 1){
			damage = 0;
			power = SpawnScript.militia + SpawnScript.ManAtArms * 10;
		}

	}
}

The issue was

  if (damage >= 10 && SpawnScript.ManAtArms > 1)
 {
 }

 if (damage >= 1 && SpawnScript.militia > 1)
 {
 }

should have been

 if (damage >= 10 && SpawnScript.ManAtArms >= 1)
 {
 }

 if (damage >= 1 && SpawnScript.militia >= 1)
 {
 }