diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-01-14 15:58:52 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-01-14 17:40:14 +0100 |
| commit | e86abf9d634b7a0bc0e4d4f83ebe6ca4ee357833 (patch) | |
| tree | 408380fcba8fac27ea983289e66ff80c5ee8697b | |
| parent | da5a3152f073a59eb936aa9c7d03d648af087503 (diff) | |
| download | vis-e86abf9d634b7a0bc0e4d4f83ebe6ca4ee357833.tar.gz vis-e86abf9d634b7a0bc0e4d4f83ebe6ca4ee357833.tar.xz | |
sam: do not clobber error value when failing to parse a group
When encountering a parsing error within a { } command group do not
set the error cause to unmatched brace.
| -rw-r--r-- | sam.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -828,6 +828,8 @@ static Command *command_parse(Vis *vis, const char **s, enum SamError *err) { while (**s == ' ' || **s == '\t' || **s == '\n') (*s)++; next = command_parse(vis, s, err); + if (*err) + goto fail; if (prev) prev->next = next; else |
