Code Translation Bug in iOS release build
Hello,
I think I found a bug in the Adobe compiler to build an iOS ipa. It only happens on ipa release builds, not interpreter builds and I have tried it with several Adobe Air SDKs (from 3.6 to 3.9).
This function:
protected function isCardValid(player:Player, card:Card):Boolean
{
if (trick.length == 0) return true;
else if (cardsMatch(trick[0], card)) return true;
var validCardLeft:Boolean = false;
for (var i:uint = 0; i < player.hand.cards.length; ++i)
if (cardsMatch(trick[0], player.hand.cards))
{
validCardLeft = true;
break;
}
return !validCardLeft;
}
Will return true on ipa-app-store, no matter the value of validCardLeft. I have verified with popups, that the value of validCardLeft contains the correct value, nevertheless the function always returns true. It happened in 2 of my games, that use this function but a different implementation for cardsMatch();
Using the ugly
if (validCardLeft) return false;
else return true;
fixes the problem.
