Skip to content

fix: make sure sim variant does not return size 0 from context_v1_size()#29

Merged
zeschg merged 1 commit intomasterfrom
fix/sim-size
Oct 24, 2025
Merged

fix: make sure sim variant does not return size 0 from context_v1_size()#29
zeschg merged 1 commit intomasterfrom
fix/sim-size

Conversation

@zeschg
Copy link
Collaborator

@zeschg zeschg commented Oct 24, 2025

In C size of empty struct is 0. Normally, you allocate memory for the context with malloc(). When you use malloc() with size 0 it is implementation-defined, but usually fails. This should avoid the issue.

@zeschg zeschg self-assigned this Oct 24, 2025
@zeschg zeschg merged commit 38a17bb into master Oct 24, 2025
2 checks passed
@zeschg zeschg deleted the fix/sim-size branch October 24, 2025 15:00
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