aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_print_visitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir_print_visitor.cpp')
-rw-r--r--src/glsl/ir_print_visitor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index 5c19db13260..e5067bfdad0 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -182,11 +182,10 @@ void ir_print_visitor::visit(ir_expression *ir)
printf(" %s ", ir->operator_string());
- if (ir->operands[0])
- ir->operands[0]->accept(this);
+ for (unsigned i = 0; i < ir->get_num_operands(); i++) {
+ ir->operands[i]->accept(this);
+ }
- if (ir->operands[1])
- ir->operands[1]->accept(this);
printf(") ");
}