From d6b4c953bcf3d7a7a22307c9fc6c1195bbdbf944 Mon Sep 17 00:00:00 2001 From: ikits Date: Wed, 1 Oct 2003 03:23:35 +0000 Subject: [PATCH] fixed sizeof bug in glew_post.c git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@145 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/src/glew_post.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto/src/glew_post.c b/auto/src/glew_post.c index 16eee3d..b9716a8 100644 --- a/auto/src/glew_post.c +++ b/auto/src/glew_post.c @@ -15,7 +15,7 @@ const GLubyte* glewGetErrorString (GLenum error) "GLX 1.2 and up are not supported", "unknown error" }; - if (error > sizeof(_glewErrorString)) error = sizeof(_glewErrorString); + if (error > 4) error = 4; return _glewErrorString[error]; } @@ -26,7 +26,7 @@ const GLubyte* glewGetString (GLenum name) NULL, "GLEW_VERSION_STRING" }; - if (name > sizeof(_glewString)-1) return NULL; + if (name > 1) name = 0; return _glewString[name]; }