mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
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>
This commit is contained in:
parent
9749d96817
commit
46b74ca7bc
1 changed files with 1 additions and 1 deletions
|
|
@ -648,7 +648,7 @@ process_array_constructor(exec_list *instructions,
|
||||||
|
|
||||||
_mesa_glsl_error(loc, state, "array constructor must have %s %u "
|
_mesa_glsl_error(loc, state, "array constructor must have %s %u "
|
||||||
"parameter%s",
|
"parameter%s",
|
||||||
(constructor_type->length != 0) ? "at least" : "exactly",
|
(constructor_type->length == 0) ? "at least" : "exactly",
|
||||||
min_param, (min_param <= 1) ? "" : "s");
|
min_param, (min_param <= 1) ? "" : "s");
|
||||||
return ir_rvalue::error_value(ctx);
|
return ir_rvalue::error_value(ctx);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue