removed signed/unsigned mismatch error

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@149 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2003-10-03 06:44:07 +00:00
parent 552977df18
commit 05d6b91c55

View File

@ -16,7 +16,7 @@ const GLubyte* glewGetErrorString (GLenum error)
"Unknown error" "Unknown error"
}; };
const int max_error = sizeof(_glewErrorString)/sizeof(*_glewErrorString) - 1; const int max_error = sizeof(_glewErrorString)/sizeof(*_glewErrorString) - 1;
return _glewErrorString[error > max_error ? max_error : error]; return _glewErrorString[(int)error > max_error ? max_error : (int)error];
} }
const GLubyte* glewGetString (GLenum name) const GLubyte* glewGetString (GLenum name)
@ -27,7 +27,7 @@ const GLubyte* glewGetString (GLenum name)
"GLEW_VERSION_STRING" "GLEW_VERSION_STRING"
}; };
const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1; const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1;
return _glewString[name > max_string ? max_string : name]; return _glewString[(int)name > max_string ? 0 : (int)name];
} }
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */