diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-12-02 16:42:45 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-12-02 16:42:45 +0000 |
| commit | 488f14860469fa61e897db51551c74532d17a883 (patch) | |
| tree | 8339912c5e604edaa25bdcb9aa5fb35fa1ff6186 /usr.bin | |
| parent | 0bae80a33650474823958d49abd291de65be2798 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/indent/parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/indent/parse.c b/usr.bin/indent/parse.c index a77019b847487..f6590fd253c26 100644 --- a/usr.bin/indent/parse.c +++ b/usr.bin/indent/parse.c @@ -172,7 +172,7 @@ parse(int tk) /* tk: the code for the construct scanned */ case rbrace: /* scanned a } */ /* stack should have <lbrace> <stmt> or <lbrace> <stmtl> */ - if (ps.p_stack[ps.tos - 1] == lbrace) { + if (ps.tos > 0 && ps.p_stack[ps.tos - 1] == lbrace) { ps.ind_level = ps.i_l_follow = ps.il[--ps.tos]; ps.p_stack[ps.tos] = stmt; } |
