Skip to content

Bug in StringList.insert() #2548

@PhiLhoSoft

Description

@PhiLhoSoft

Reported in the forum: http://forum.processing.org/two/discussion/5449/stringlist-insert-throwing-exception

insertionList.append("kapow");
insertionList.append("kapowski");
insertionList.append("kapowskidoo");
insertionList.append("kapowskidont");
insertionList.insert(1,blah);

throws an exception.

Code shows in the insert() method:

if (index >= values.length) {

it should be:

if (index >= data.length) {

It is correct in the other XxxList classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions