Skip to content

Commit 53963e4

Browse files
JohannesLorenzfundamental
authored andcommitted
Fix invalid 0 initialization
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
1 parent 0e91f0c commit 53963e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rtosc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ size_t rtosc_amessage(char *buffer,
435435

436436
static rtosc_arg_t extract_arg(const uint8_t *arg_pos, char type)
437437
{
438-
rtosc_arg_t result = {0};
438+
rtosc_arg_t result = {};
439439
//trivial case
440440
if(!has_reserved(type)) {
441441
switch(type)

0 commit comments

Comments
 (0)