summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_array_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ast_array_index.cpp')
-rw-r--r--src/glsl/ast_array_index.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp
index 5e8f49d70b0..7855e0a6190 100644
--- a/src/glsl/ast_array_index.cpp
+++ b/src/glsl/ast_array_index.cpp
@@ -28,13 +28,10 @@
void
ast_array_specifier::print(void) const
{
- if (this->is_unsized_array) {
- printf("[ ] ");
- }
-
foreach_list_typed (ast_node, array_dimension, link, &this->array_dimensions) {
printf("[ ");
- array_dimension->print();
+ if (((ast_expression*)array_dimension)->oper != ast_unsized_array_dim)
+ array_dimension->print();
printf("] ");
}
}