• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Code Translation Bug in iOS release build

Advocate ,
Nov 14, 2013 Nov 14, 2013

Copy link to clipboard

Copied

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.

TOPICS
Development

Views

811

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 01, 2014 Apr 01, 2014

Copy link to clipboard

Copied

LATEST

Ran into a similar issue on AIR 4.0 while using "-swf-version=21" as an additional compiler option.

Assigning a boolean variable the value "false" and checking it in an if statement always evaluates as "true" on iOS ad hoc builds.

Changing the if statement to check "true" instead and using an else to handle the appropriate logic seems to have fixed the issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines