aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-08-27 14:48:16 +0000
committerBrian Paul <[email protected]>2003-08-27 14:48:16 +0000
commita6ed6f48e6bf4ca5427d921cac863cf3b42f7efc (patch)
treede4a2459ad787c4a3e713cad90572601eaca1e00
parentd49acd629b67ad0a59038f47aab7be578a62db72 (diff)
make _glapi_get_proc_address() return NULL if function doesn't start with gl prefix
-rw-r--r--src/mesa/glapi/glapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 3cb4ccca341..85330dd6674 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -740,8 +740,12 @@ _glapi_get_proc_offset(const char *funcName)
const GLvoid *
_glapi_get_proc_address(const char *funcName)
{
- /* search extension functions first */
GLuint i;
+
+ if (funcName[0] != 'g' || funcName[1] != 'l')
+ return NULL;
+
+ /* search extension functions first */
for (i = 0; i < NumExtEntryPoints; i++) {
if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
return ExtEntryTable[i].Address;