Skip to content

Bug: Incorrect tuple-length validation in statetransitionref.py #514

Description

@seif-galal

In statetransitionref.py, the validation for TableStructParameter currently contains:

if not isinstance(inner_param_value, tuple) or len(inner_param_value) == 2:
odxraise("Invalid value for table struct parameter")

The len(...) == 2 condition is inverted.

A TableStructParameter expects a tuple containing exactly two values, so the validation should reject tuples whose length is not 2.

Proposed fix

Change:

len(inner_param_value) == 2

to:

len(inner_param_value) != 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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