Converting int to char

Fixes warning: narrowing conversion caused by trying to convert int to unsigned char
This commit is contained in:
Aidon 2025-03-13 21:50:20 -03:00 committed by GitHub
parent cb830bed72
commit 513753c394
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,11 @@ int main(void)
spacing += (int)buildings[i].width;
buildColors[i] = (Color){ GetRandomValue(200, 240), GetRandomValue(200, 240), GetRandomValue(200, 250), 255 };
buildColors[i] = (Color){
(unsigned char)GetRandomValue(200, 240),
(unsigned char)GetRandomValue(200, 240),
(unsigned char)GetRandomValue(200, 250),
255};
}
Camera2D camera = { 0 };