Fix up the operator printing for the logic or and beyond, check array bounds.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user