From 8462fe2bbf2aac87e6eabddc805b3d3ec63c6376 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 2 Mar 2010 01:10:29 -0800 Subject: [PATCH] glsl: Add assert to check input to strcmp. --- src/mesa/shader/slang/slang_builtin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 5533cc5b655..f0659a8d8bb 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -142,6 +142,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[1] = index1; } else if (strcmp(var, "gl_Point") == 0) { + assert(field); if (strcmp(field, "size") == 0) { tokens[0] = STATE_POINT_SIZE; *swizzleOut = SWIZZLE_XXXX; -- 2.30.2