summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_function.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2013-06-10 13:28:40 -0700
committerMatt Turner <mattst88@gmail.com>2013-07-11 20:58:58 -0700
commit46b74ca7bc06ce092136cd313fd963e82be06b00 (patch)
tree439486c7cb58aec907535211c98662b0e32d5cc4 /src/glsl/ast_function.cpp
parent9749d96817d9ab98567155dd3598163a7fbf6cb3 (diff)
downloadexternal_mesa3d-46b74ca7bc06ce092136cd313fd963e82be06b00.zip
external_mesa3d-46b74ca7bc06ce092136cd313fd963e82be06b00.tar.gz
external_mesa3d-46b74ca7bc06ce092136cd313fd963e82be06b00.tar.bz2
glsl: Fix inverted conditional in error message.
The code float a[2] = float[2]( 3.4, 4.2, 5.0 ); previously generated this: error: array constructor must have at least 2 parameters when in fact it requires exactly two. Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romainck@intel.com>
Diffstat (limited to 'src/glsl/ast_function.cpp')
-rw-r--r--src/glsl/ast_function.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 0860238..4b0b873 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -648,7 +648,7 @@ process_array_constructor(exec_list *instructions,
_mesa_glsl_error(loc, state, "array constructor must have %s %u "
"parameter%s",
- (constructor_type->length != 0) ? "at least" : "exactly",
+ (constructor_type->length == 0) ? "at least" : "exactly",
min_param, (min_param <= 1) ? "" : "s");
return ir_rvalue::error_value(ctx);
}