Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3748 in a recent build.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    1
    troels is on a distinguished road

      0  

    Default Ext.Array.intersect bug

    Ext.Array.intersect bug


    Hello Sencha,

    I've found a bug in the Ext.Array class in the intersect method. I presume it's there in all versions.

    In the main loop for traversing the minimum array, the for loop has the conditions

    Code:
    for (i = 0,ln = minArray.length; i < ln,x = minArray[i]; i++) 
    
    In the condition that's evaluated after each iteration, someone has been a little too clever and written the condition
    Code:
    i < ln,x = minArray[i]
    
    This comma expressions ignores the actual result of the loop and returns the second expression as the result.
    In my case, there is a 0 in the array of values, causing the look to stop prematurely.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    873
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Ext JS Premium Member
    Join Date
    Oct 2010
    Location
    West Germany
    Posts
    55
    Vote Rating
    4
    olegtaranenko is on a distinguished road

      0  

    Smile


    one kind of bad programmers practice :P

Thread Participants: 2

Tags for this Thread