Fix uninitialized variable rgba

This commit is contained in:
Dimitris Apostolou 2025-01-16 01:12:57 +02:00
parent e7ea71be03
commit c337b21310
No known key found for this signature in database
GPG Key ID: 4B5D20E938204A8A
3 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,7 @@ video tutorials.
- Bobyshev Alexander
- Laurent Aphecetche
- Dimitris Apostolou
- Matt Arsenault
- Takuro Ashie
- ashishgamedev

View File

@ -124,6 +124,7 @@ information on what to include when reporting a bug.
- Added `GLFW_UNLIMITED_MOUSE_BUTTONS` input mode that allows mouse buttons beyond
the limit of the mouse button tokens to be reported (#2423)
- Updated minimum CMake version to 3.16 (#2541)
- Fixed uninitialized variable rgba
- [Cocoa] Added `QuartzCore` framework as link-time dependency
- [Cocoa] Removed support for OS X 10.10 Yosemite and earlier (#2506)
- [Wayland] Bugfix: The fractional scaling related objects were not destroyed

View File

@ -487,6 +487,8 @@ static void draw_particles(GLFWwindow* window, double t, float dt)
if (alpha > 1.f)
alpha = 1.f;
rgba = 0;
// Convert color from float to 8-bit (store it in a 32-bit
// integer using endian independent type casting)
((GLubyte*) &rgba)[0] = (GLubyte)(pptr->r * 255.f);