Skip to content

HASelect setOptions crashes with options string longer than 256 chars #300

@thebyteworks

Description

@thebyteworks

HASelect setOptions crashes with options string longer than 256 chars,
because in HASelect.cpp

uint8_t HASelect::countOptionsInString(const char* options) const
...
for (uint8_t i = 0; i < optionsLen; i++) {

i is uint8_t

A light effects selector can easily take a longer list of options.

I changed to uint16_t and is working fine with a longer > 256 chars options string.

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