Skip to content

ActionOrigin.byOrdinal does not handle new origins gracefully, resulting in ArrayIndexOutOfBoundsException #149

@chrislo27

Description

@chrislo27

The ActionOrigin enum function byOrdinal throws an ArrayIndexOutOfBoundsException if the action origin number returned by Steam is greater than the available enums.

I noticed this when a friend was testing my game on an ROG Ally. Steam returned an index 389 which is greater than the 386 available origins.

Since Steam can add origins to support new controllers, this should probably be gracefully handled, maybe with an Unknown enum value in ActionOrigin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions