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>
(cherry picked from commit 4039603413)
This commit is contained in:
Ian Romanick 2009-02-17 08:27:32 -08:00 committed by Jeremy Huddleston
parent 5cae7f5a60
commit ee6ce7e4cc

View file

@ -403,7 +403,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;