a mildly funny bug
Today, trying to track down a mysterious regression, I noticed this condition in an if in CombatCommander::getAttackOrder():
enemy.type == enemy.type == BWAPI::UnitTypes::Protoss_High_Templar
Hmm, it looks a little different than I intended. == is left-associative, so this always evaluates to true. The effect is that Steamhammer might make a poor decision of which enemy base to attack. The decision is pretty rough anyway, though, so the buggy decision is not much worse.
Gotta love edit slip bugs, they are so creative. In this case, the original intention is also wrong, because high templar are excluded by an earlier check—the condition would have always been false.
If only I could find the bugs that matter, instead of the bugs that don’t hurt much....
Comments
McRave on :
That took a while to find!
Joseph Huang on :
Jay Scott on :