You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix C23 bool type being 1 byte long, while the enum bool is 4 bytes.
C23 introduced `true` and `false` as language keywords, breaking YQ2s
use of them. The first attempt to get C23 was to use the buildin `bool`
type when building in C23 mode and the classic enum based `qboolean`
in any other mode. This didn't take into acount, that `bool` is 1 byte
long, while the enum based `qboolean` is 4 bytes long. This breaks
savegames and may have impact for mods.
Fix this by always using `int` as `qboolean` and the buildin `true` and
`false` types, either in their C99 or C23 variant. This way `qboolean`
is always 4 bytes long and the newly introduced `true` and `false`
keywords don't clash.
Suggested by @DanielGibson.
0 commit comments