[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clearing a static array - seg fault


Thanks!

~~~~~ Brian


From: user@xxxxxxxxxxxxxxxxxxxxxx <user@xxxxxxxxxxxxxxxxxxxxxx> on behalf of Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Sent: Sunday, January 26, 2025 12:51:08 PM
To: user@xxxxxxxxxxxxxxxxxxxxxx <user@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Clearing a static array - seg fault

Le 26/01/2025 à 20:12, Brian G a écrit :
> Should clearing a static array in a structure behave the same as a
> dynamic multi dimensional array and set all values to zero.
>
> Right now it just segfaults. As the structure is not in normal variable
> space, but fill(0) works fine.
>
> Perhaps clear should call fill(0) in case of static arrays.
>

It's fixed in the last commit. The array contents is now emptied.

Regards,

--
Benoît Minisini.




References:
Clearing a static array - seg faultBrian G <brian@xxxxxxxxxxxxxxxx>
Re: Clearing a static array - seg faultBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>