Add instructions to zero mextra struct pointer in mextra documentation

It doesn't mention anywhere that newmextra() is responsible for
initializing struct mextra with null pointers to the various
sub-structs. So, when one follows the instructions and doesn't know or
remember to do this, they'll get segfaults when something tries to read
the uninitialized pointer to their new struct.
This commit is contained in:
copperwater
2020-07-30 23:07:30 -04:00
parent 8ca0834eb2
commit 922321b251

View File

@@ -56,6 +56,8 @@
* struct or data during a restore.
* 10. Adjust savemon() in src/save.c to deal with your
* struct or data during a save.
* 11. Zero out the pointer to your struct in newmextra() in
* src/makemon.c.
*/
/***