mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-06 06:09:17 -05:00
Fix call argument is an uninitialized value
This commit is contained in:
committed by
Martinfx
parent
df74607479
commit
9459186125
@ -10,7 +10,6 @@
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <stdlib.h> // Required for: malloc(), free()
|
||||
|
||||
#define MAX_BUNNIES 100000 // 100K bunnies
|
||||
@ -33,6 +32,7 @@ int main()
|
||||
Texture2D texBunny = LoadTexture("resources/wabbit_alpha.png");
|
||||
|
||||
Bunny *bunnies = (Bunny *)malloc(MAX_BUNNIES*sizeof(Bunny)); // Bunnies array
|
||||
|
||||
int bunniesCount = 0; // Bunnies counter
|
||||
|
||||
SetTargetFPS(60);
|
||||
@ -72,7 +72,7 @@ int main()
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
for (int i = 0; i <= bunniesCount; i++)
|
||||
for (int i = 0; i < bunniesCount; i++)
|
||||
{
|
||||
// NOTE: When internal QUADS batch limit is reached, a draw call is launched and
|
||||
// batching buffer starts being filled again; before launching the draw call,
|
||||
@ -84,7 +84,6 @@ int main()
|
||||
DrawRectangle(0, 0, screenWidth, 40, LIGHTGRAY);
|
||||
DrawText("raylib bunnymark", 10, 10, 20, DARKGRAY);
|
||||
DrawText(FormatText("bunnies: %i", bunniesCount), 400, 10, 20, RED);
|
||||
|
||||
DrawFPS(260, 10);
|
||||
|
||||
EndDrawing();
|
||||
|
||||
Reference in New Issue
Block a user