Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5339] Boolean eval different between simulator and iPad

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNot Our Bug
Resolution Date2017-11-03T09:30:58.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterHubert Bannwarth
AssigneeShak Hossain
Created2017-11-02T17:04:17.000+0000
Updated2017-11-03T09:35:16.000+0000

Description

Steps to Reproduce

the following line var result = false var artid = '05173'; if (((art_id+'') > '49999zzzzz') && ((art_id+'') < '89900')) result = true; gets false on simulator and true on iPad (iOS11.0.3) the actual result of the expression on the iPad is : 0517389900 the expected result is : false

Actual Result

true

Expected Result

false

Comments

  1. Hubert Bannwarth 2017-11-02

    The SDK used is 6.2.2GA Xcode 9.0
  2. Hans Knöchel 2017-11-03

    Seems like an iOS-issue then, we do not influence the internal number-behavior. Please file a bug at Apple to investigate this or clean-up the code to avoid this kind of string comparisons.
  3. Hubert Bannwarth 2017-11-03

    This worked with preceding SDK on the same iOS version so I do not think that the bug is apple related

JSON Source