-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Bug Report
The STD_MAX is set to 35, however only 15 entries are filled https://github.com/devkitPro/buildscripts/blob/b5cdec82b7a5e9bcac1b887ad9108855fc81c349/dka64/patches/newlib-4.5.0.20241231.patch#L8028, so once you try to add device 16, it will crash.
This bug exists in all versions. PPC https://github.com/devkitPro/buildscripts/blob/b5cdec82b7a5e9bcac1b887ad9108855fc81c349/dkppc/patches/newlib-4.5.0.20241231.patch#L7978 and arm https://github.com/devkitPro/buildscripts/blob/b5cdec82b7a5e9bcac1b887ad9108855fc81c349/dkarm-eabi/patches/newlib-4.5.0.20241231.patch#L8028.
imo, i would remove the STD_MAX from the array and have the array size be calculated automatically, then add a static_assert(STD_MAX == sizeof(devoptab_list) / sizeof(devoptab_list[0]), "devoptab_list size missmatch!") in case the size is ever changed again.