Skip to content

Conversation

@JohannesLorenz
Copy link
Collaborator

The line

rtosc_arg_t result = {0};

fails to zero-initialize the whole union (it only does so for the first member, which is different behavior to structs).

This is fixed using "designated zero-initialization":

rtosc_arg_t result = {};

Checked the whole code, no other such union initialization issues.

This fixes test failures on some machines:

fat-message
test-arg-iter
SaveOscPresets
SaveOscBigFile

The line

```c++
rtosc_arg_t result = {0};
```

fails to zero-initialize the whole union (it only does so for the first
member, which is different behavior to structs).

This is fixed using "designated zero-initialization":

```c++
rtosc_arg_t result = {};
```

Checked the whole code, no other such union initialization issues.

This fixes test failures on some machines:

  fat-message
  test-arg-iter
  SaveOscPresets
  SaveOscBigFile
@fundamental
Copy link
Owner

Looks like I'm learning something new about C initializers today. Good find :)

@fundamental fundamental merged commit 53963e4 into master Oct 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants