Przeglądaj źródła

Merge pull request #4839 from aidonmaster/patch-1

 Converting int to char
Ray 6 miesięcy temu
rodzic
commit
bbbdd1f080
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      examples/core/core_2d_camera.c

+ 5 - 1
examples/core/core_2d_camera.c

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