Fixes a too small index

This commit is contained in:
Alayan-stk-2 2018-04-13 23:32:37 +02:00 committed by GitHub
parent 607ee6ed75
commit 79fd0f12a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -550,7 +550,7 @@ void RaceGUI::drawEnergyMeter(int x, int y, const AbstractKart *kart,
unsigned int count = computeVerticesForMeter(position, threshold, vertices, vertices_count,
state, gauge_width, gauge_height, offset);
short int index[5]={0};
short int index[vertices_count]={0};
for(unsigned int i=0; i<count; i++)
{
index[i]=count-i-1;
@ -582,7 +582,7 @@ void RaceGUI::drawEnergyMeter(int x, int y, const AbstractKart *kart,
unsigned int count = computeVerticesForMeter(position, threshold, vertices, vertices_count,
coin_target, gauge_width, gauge_height, offset);
short int index[5]={0};
short int index[vertices_count]={0};
for(unsigned int i=0; i<count; i++)
{
index[i]=count-i-1;