Page MenuHomeFeedback Tracker

param command should pick default value for negative indices
Closed, ResolvedPublic

Description

A negative index between -1.4999999 and 0 will still pick the first element of the array instead of the default value.

Details

Legacy ID
3276592622
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Enter either in debug console:

["one","two","three"] param [([1,2,3] find 5),"not found"]
["one","two","three"] param [ -1 ,"not found"]
-> "one"

It should report "not found", but it doesn't.

Event Timeline

commy2 edited Steps To Reproduce. (Show Details)Nov 28 2015, 2:27 PM
commy2 set Category to Scripting.
commy2 set Reproducibility to Always.
commy2 set Severity to None.
commy2 set Resolution to Fixed.
commy2 set Legacy ID to 3276592622.May 8 2016, 1:09 PM
commy2 edited a custom field.

Fixed in today's dev.

commy2 added a subscriber: commy2.May 8 2016, 1:09 PM
commy2 added a comment.Jan 5 2016, 7:51 PM

+1
Confirmed working. Great Job!