mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-07-28 01:51:49 +03:00
3eb3c30817
Since INTERIM_COMMIT is a char array whose size we know for sure at compile time, and which we also know is an array (instead of being a pointer), we can take the SDL_arraysize() of it. However, SDL_arraysize() doesn't account for the null terminator unlike SDL_strlen(), so we'll have to do it ourselves. But at least we are guaranteed to get a constant value at compile time, unlike if we use SDL_strlen(), which would be repeatedly evaluating a constant value at runtime. To my knowledge, there's no equivalent SDL_arraysize() for constant strings, and a quick `rg` (ripgrep) for "sizeof" in the SDL include/ folder doesn't show anything like that. So we'll just have to use the SDL_arraysize() - 1 and deal with it.