summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_builtin.c
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-03-04 00:53:52 -0800
committerVinson Lee <[email protected]>2010-03-04 00:53:52 -0800
commitdf20c3943ab4e20055f8e731f112aa9fd8d66068 (patch)
treef4c91e8c714d6e1be617746825882f192feb7b09 /src/mesa/shader/slang/slang_builtin.c
parentdf62b0da92f50b309d79d6552ecdf5a59910c80a (diff)
glsl: Add assert to check input to strcmp.
Diffstat (limited to 'src/mesa/shader/slang/slang_builtin.c')
-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 f0659a8d8bb..791e751526d 100644
--- a/src/mesa/shader/slang/slang_builtin.c
+++ b/src/mesa/shader/slang/slang_builtin.c
@@ -182,6 +182,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
tokens[1] = 0;
else
tokens[1] = 1;
+ assert(field);
if (strcmp(field, "emission") == 0) {
tokens[2] = STATE_EMISSION;
}