glx: Inialize best_score before calculating visual scores

This bug was pointed out by Peter Åstrand.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Ian Romanick 2009-02-17 08:27:32 -08:00
parent bac13e54b1
commit 4039603413

View File

@ -354,7 +354,7 @@ static __GLXconfig *
pickFBConfig(__GLXscreen *pGlxScreen, VisualPtr visual)
{
__GLXconfig *best = NULL, *config;
int best_score;
int best_score = 0;
for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) {
int score = 0;