Skip to content

Indexing problem when finding serial ports #2

@ericbarefoot

Description

@ericbarefoot

There is an indexing issue that causes the serial connection to fail in most operating systems. The issue appears to be connected to the indexing at these lines.

The issue produces the following error on startup:

All available ports: ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4

It appears that the issue might be fixable by changing line 136 to read: SerialPortNum = i-1;

Not sure if this is a robust change, or whether this makes the code fragile.

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