projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acb3624
)
Fix up the operator printing for the logic or and beyond, check array bounds.
author
Eric Anholt
<eric@anholt.net>
Thu, 25 Mar 2010 23:47:49 +0000
(16:47 -0700)
committer
Eric Anholt
<eric@anholt.net>
Thu, 25 Mar 2010 23:47:49 +0000
(16:47 -0700)
ast_expr.cpp
patch
|
blob
|
history
diff --git
a/ast_expr.cpp
b/ast_expr.cpp
index ad29cdc68d73b9b6ed138b0981a31b1621a4e7bd..4e83decb924d95e775b5004c7227ffbf5865b033 100644
(file)
--- a/
ast_expr.cpp
+++ b/
ast_expr.cpp
@@
-50,6
+50,7
@@
ast_expression::operator_string(enum ast_operators op)
"~",
"&&",
"^^",
+ "||",
"!",
"*=",
@@
-64,6
+65,7
@@
ast_expression::operator_string(enum ast_operators op)
"|=",
"?:",
+
"++",
"--",
"++",
@@
-71,6
+73,8
@@
ast_expression::operator_string(enum ast_operators op)
".",
};
+ assert((unsigned int)op < sizeof(operators) / sizeof(operators[0]));
+
return operators[op];
}