summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_clone.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-11-10 16:33:10 -0800
committerIan Romanick <[email protected]>2010-11-19 15:00:25 -0800
commitfc92e87b9757eda01caf0bb3e2c31b1dbbd73aa0 (patch)
tree0166f7ad2f9b19794f8a65b0b050fe4dc4cd083a /src/glsl/ir_clone.cpp
parentf2616e56de8a48360cae8f269727b58490555f4d (diff)
glsl: Eliminate assumptions about size of ir_expression::operands
This may grow in the near future.
Diffstat (limited to 'src/glsl/ir_clone.cpp')
-rw-r--r--src/glsl/ir_clone.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index a3cc8dbc970..4032647c3a2 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -22,6 +22,7 @@
*/
#include <string.h>
+#include "main/compiler.h"
#include "ir.h"
#include "glsl_types.h"
extern "C" {
@@ -160,7 +161,7 @@ ir_call::clone(void *mem_ctx, struct hash_table *ht) const
ir_expression *
ir_expression::clone(void *mem_ctx, struct hash_table *ht) const
{
- ir_rvalue *op[2] = {NULL, NULL};
+ ir_rvalue *op[Elements(this->operands)] = { NULL, };
unsigned int i;
for (i = 0; i < get_num_operands(); i++) {