indent(1): don't overflow di_stack[]
This commit is contained in:
parent
9de29bfb5a
commit
370d0cf9be
@ -831,7 +831,12 @@ main(int argc, char **argv)
|
||||
* with '{' */
|
||||
if (ps.in_decl && ps.in_or_st) { /* this is either a structure
|
||||
* declaration or an init */
|
||||
di_stack[ps.dec_nest++] = dec_ind;
|
||||
di_stack[ps.dec_nest] = dec_ind;
|
||||
if (++ps.dec_nest == nitems(di_stack)) {
|
||||
diag3(0, "Reached internal limit of %d struct levels",
|
||||
nitems(di_stack));
|
||||
ps.dec_nest--;
|
||||
}
|
||||
/* ? dec_ind = 0; */
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user