Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3755 closed Bug (Fixed)

_ArrayInsert fails with Error 3 when the Insert Positions parameter is a delimited string

Reported by: AlanParry Owned by: Melba23
Milestone: 3.3.15.1 Component: Standard UDFs
Version: 3.3.14.5 Severity: None
Keywords: Cc:

Description

For example, if the Insert Positions parameter $vValue is "7;10" _ArrayInsert fails with Error code 3.

The reason is that when _ArrayInsert compares the insertion points to check that they are in ascending order, what it compares are the string representation of the numbers and guess what: "7" is NOT less than "10"

Attachments (0)

Change History (6)

comment:1 by J-Paul Mesnage, 6 years ago

tested with release or Beta?

comment:2 by Melba23, 6 years ago

The old chestnut of numbers being converted to strings and then compared, leading to invalid comparisons. Easy to fix - and I will check the other _Array functions to see if there are similar errors hiding away.

M23

comment:3 by Melba23, 6 years ago

Fixed _Insert and also amended _Delete, although the latter does not depend on ascending indices. If you would like to try the amended library before I commit it please PM me and I will let you have a copy.

M23

comment:4 by Melba23, 6 years ago

Owner: set to Melba23
Status: newassigned

comment:5 by Melba23, 6 years ago

Milestone: 3.3.15.1
Resolution: Fixed
Status: assignedclosed

Fixed by revision [12256] in version: 3.3.15.1

comment:6 by Melba23, 6 years ago

Fixed by revision [12257] in version: 3.3.15.1

Modify Ticket

Action
as closed The owner will remain Melba23.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.