Skip to content

fix(idl): prevent panic in array type parsing#4167

Closed
TiagoCostaVieira wants to merge 1 commit intosolana-foundation:masterfrom
TiagoCostaVieira:TIG45#4016-SNAPSHOT
Closed

fix(idl): prevent panic in array type parsing#4167
TiagoCostaVieira wants to merge 1 commit intosolana-foundation:masterfrom
TiagoCostaVieira:TIG45#4016-SNAPSHOT

Conversation

@TiagoCostaVieira
Copy link
Copy Markdown

  • Replace unwrap() with proper error handling in IdlType::from_str
  • Support both ';' and space as array delimiters for compatibility
  • Add clear error messages for invalid array formats
  • Resolves parsing of '[u8 32]' without causing panic

Fixes: Array type parsing bug where rsplit_once(';').unwrap() would panic

- Replace unwrap() with proper error handling in IdlType::from_str
- Support both ';' and space as array delimiters for compatibility
- Add clear error messages for invalid array formats
- Resolves parsing of '[u8 32]' without causing panic

Fixes: Array type parsing bug where rsplit_once(';').unwrap() would panic
Signed-off-by: Tiago Vieira <tiagocosvieira@gmail.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 6, 2026

@TiagoCostaVieira is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@jamie-osec
Copy link
Copy Markdown
Collaborator

Closing in favour of #4029

@jamie-osec jamie-osec closed this Mar 13, 2026
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.

2 participants