summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-03-02 01:10:29 -0800
committerVinson Lee <[email protected]>2010-03-02 01:10:29 -0800
commit8462fe2bbf2aac87e6eabddc805b3d3ec63c6376 (patch)
treeeddc51821a8d59674464f0d2b0525cb253a76895 /src
parent247008f6c2014c8f84de3a27ac954afe2c418a93 (diff)
glsl: Add assert to check input to strcmp.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_builtin.c1
1 files changed, 1 insertions, 0 deletions
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;