From 4fe238e023d152e55c7aac210be2e930b06b412c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 19 Jan 2017 18:00:01 +0000 Subject: [PATCH] tests/wgl: Use the right array offsets And avoid an out of bounds access warning. --- test/wgl_usefontbitmaps.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/wgl_usefontbitmaps.c b/test/wgl_usefontbitmaps.c index 3287b65..8a528da 100644 --- a/test/wgl_usefontbitmaps.c +++ b/test/wgl_usefontbitmaps.c @@ -46,17 +46,17 @@ test_function(HDC hdc) } /* First, use the #ifdeffed variant of the function */ - wglUseFontBitmaps(hdc, 0, 255, dlist[1]); + wglUseFontBitmaps(hdc, 0, 255, dlist[0]); glListBase(dlist[1]); glCallLists(strlen(string), GL_UNSIGNED_BYTE, string); /* Now, use the specific version, manually. */ #ifdef UNICODE - wglUseFontBitmapsW(hdc, 0, 255, dlist[2]); + wglUseFontBitmapsW(hdc, 0, 255, dlist[0]); #else - wglUseFontBitmapsA(hdc, 0, 255, dlist[2]); + wglUseFontBitmapsA(hdc, 0, 255, dlist[0]); #endif - glListBase(dlist[2]); + glListBase(dlist[1]); glCallLists(strlen(string), GL_UNSIGNED_BYTE, string); wglMakeCurrent(NULL, NULL);