fix win build crash (#425)

sizeof issue make it crash on windows.
Thanks Melon :)
This commit is contained in:
Baoulettes 2022-06-02 04:06:32 +02:00 committed by GitHub
parent daec428cb3
commit 0bfe2fec67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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";