diff options
| author | Baoulettes <perlouzerie@hotmail.fr> | 2022-06-02 04:06:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-01 22:06:32 -0400 |
| commit | 0bfe2fec674d6f7aa6c3becfa50bc88ec7fd8d88 (patch) | |
| tree | 08e317e825f139e154eb1384c2bfb1268692c255 | |
| parent | daec428cb3844bdb5261f5ddf47b613cce514d05 (diff) | |
fix win build crash (#425)
sizeof issue make it crash on windows.
Thanks Melon :)
| -rw-r--r-- | libultraship/libultraship/SohImGuiImpl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 3c3ca9c6c..23fa4ffa9 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -259,7 +259,8 @@ namespace SohImGui { } void LoadRainbowColor() { - for (uint16_t s=0; s <= sizeof(RainbowColorCvarList); s++) { + u8 arrayLength = sizeof(RainbowColorCvarList) / sizeof(*RainbowColorCvarList); + for (u8 s = 0; s < arrayLength; s++) { std::string cvarName = RainbowColorCvarList[s]; std::string Cvar_Red = cvarName; Cvar_Red += "R"; |
