From: Vinson Lee Date: Tue, 2 Mar 2010 09:10:29 +0000 (-0800) Subject: glsl: Add assert to check input to strcmp. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8462fe2bbf2aac87e6eabddc805b3d3ec63c6376;p=mesa.git glsl: Add assert to check input to strcmp. --- 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;