Modify

Opened 16 years ago

Closed 16 years ago

#457 closed Bug (No Bug)

I'm a moron and like to swear in ticket titles.

Reported by: Pascal258 Owned by: Jos
Milestone: Component: Standard UDFs
Version: 3.2.12.0 Severity: None
Keywords: Cc:

Description

Inside of _ArrayDelete you get "Local $iUBound = UBound($avArray, 1) - 1". In the loop in Case 1 you also substract -1 which is wrong.
"For $i = $iElement To $iUBound - 1" should be "For $i = $iElement To $iUBound"

greetings,
Pascal257

Attachments (0)

Change History (5)

comment:1 follow-up: Changed 16 years ago by Valik

  • Summary changed from _ArrayDelete fucked up. to I'm a moron and like to swear in ticket titles.

Ticket title changed. Seriously, was that necessary?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 16 years ago by anonymous

Replying to Valik:

Ticket title changed. Seriously, was that necessary?

So and your comment and title is/was also necessary?

comment:3 Changed 16 years ago by Gary

  • Component changed from AutoIt to Standard UDFs
  • Owner set to Jos
  • Status changed from new to assigned

comment:4 Changed 16 years ago by Gary

I believe the loop is correct, if it is a 1 dimension array then you move everything up the array by one, being it is moving everything by one it needs to stop 2 before the end of the array. Same goes for a 2 dimension array.

comment:5 in reply to: ↑ 2 Changed 16 years ago by Valik

  • Resolution set to No Bug
  • Status changed from assigned to closed

Replying to anonymous:

Replying to Valik:

Ticket title changed. Seriously, was that necessary?

So and your comment and title is/was also necessary?

I don't really think that's relevant. You created a ticket for something that isn't a bug. Can you demonstrate the code, as written, presents a problem?. To top it off you do so by creating a ticket with a profane title. Why shouldn't I go out of my way to discourage you from ever wasting my time using the issue tracker again? You're not off to an auspicious start here. And your behavior has earned you a vacation from the forum.

The lesson(s) you need to take from this is/are 1) Think before you act; 2) If you're going to be an ass-hat, wear it somewhere else, please.

I'm closing this. Quite obviously, and as Gary pointed out, this is not a bug. The next array element ($i + 1) is read in the loop which means the loop must stop at UBound() - 2 which is what the code reflects. Otherwise the code will attempt to index out of bounds.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jos.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.