mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 12:39:54 +00:00
26a006cfac
The old setup relied on there being at least one constructor *or* the value of *__CTOR_LIST__ being NULL. Neither of these are guaranteed; and having no C++ constructors actually resulted in a random value being read (which passed the NULL check!). This new setup uses the __CTOR_END__ symbol; which is a pointer to just after the end of the list. When there are no constructors, it has the same value as __CTOR_LIST__; so the while loop is never entered. This fix also allows us to re-enable destructors; in case they're ever needed.