Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3748 in Sprint 29.
  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
    St. Louis, MO
    Posts
    34,121
    Vote Rating
    453
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      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
    49
    Vote Rating
    0
    olegtaranenko is on a distinguished road

      0  

    Smile


    one kind of bad programmers practice :P

Tags for this Thread