소스 검색

Merge pull request #4839 from aidonmaster/patch-1

 Converting int to char
Ray 6 달 전
부모
커밋
bbbdd1f080
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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 };