Mesa (master): glsl: Add assert to check input to strcmp.
Vinson Lee
vlee at kemper.freedesktop.org
Tue Mar 2 09:10:54 UTC 2010
Module: Mesa
Branch: master
Commit: 8462fe2bbf2aac87e6eabddc805b3d3ec63c6376
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8462fe2bbf2aac87e6eabddc805b3d3ec63c6376
Author: Vinson Lee <vlee at vmware.com>
Date: Tue Mar 2 01:10:29 2010 -0800
glsl: Add assert to check input to strcmp.
---
src/mesa/shader/slang/slang_builtin.c | 1 +
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 5533cc5..f0659a8 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;
More information about the mesa-commit
mailing list