Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cairo1-run array argument's length can not be less than 2 #1737

Merged
merged 9 commits into from
May 9, 2024

Conversation

catusax
Copy link
Contributor

@catusax catusax commented Apr 26, 2024

fix: cairo1-run array argument's length can not be less than 2

Description

if the program has an argument which is an empty array or the length is 1, cairo1-run fails with error:

thread 'main' panicked at cairo1-run/src/main.rs:73:78:
called `Result::unwrap()` on an `Err` value: FromStrError

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

Copy link
Member

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Please add this PR to the CHANGELOG.md file so we can record the changes!

@catusax catusax requested a review from fmoletta April 26, 2024 15:18
@catusax
Copy link
Contributor Author

catusax commented Apr 26, 2024

Thanks for the fix! Please add this PR to the CHANGELOG.md file so we can record the changes!

CHANGELOG has been updated. please check again

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@juanbono juanbono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you provide an example program where you need to pass less than 2 args and a test?

@catusax
Copy link
Contributor Author

catusax commented May 8, 2024

@juanbono tests has been added

@juanbono juanbono added this pull request to the merge queue May 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 8, 2024
@Oppen Oppen enabled auto-merge May 9, 2024 02:44
@Oppen Oppen added this pull request to the merge queue May 9, 2024
Merged via the queue into lambdaclass:main with commit f47f760 May 9, 2024
67 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants