Fixed code that has computed incorrect number of modes.
authorErdi Chen <erdi@freedesktop.org>
Wed, 12 May 2004 18:37:11 +0000 (18:37 +0000)
committerErdi Chen <erdi@freedesktop.org>
Wed, 12 May 2004 18:37:11 +0000 (18:37 +0000)
src/mesa/drivers/dri/unichrome/server/via_dri.c

index 7ccb62bd0666fd1b2761e844772f996e58369d5d..0a6c8c04caba1f619dad05bce4766f1f7e586c40 100644 (file)
@@ -435,7 +435,7 @@ const __GLcontextModes __glModes[] =
 static int viaInitContextModes(const DRIDriverContext *ctx,
                                   int *numModes, const __GLcontextModes **modes)
 {
-    *numModes = sizeof(__glModes)/sizeof(__GLcontextModes *);
+    *numModes = sizeof(__glModes)/sizeof(__glModes[0]);
     *modes = &__glModes[0];
     return 1;
 }