diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-10-11 20:25:58 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-10-11 20:25:58 +0000 |
commit | 03157b1649b22dd06f0d0e1da464bee2d3a2811c (patch) | |
tree | 6640377eddf4b0b28e47befa7445688fa28bb2b3 | |
parent | 8fcdaa5073add0a8940e1d8a54acf01bb236e03f (diff) | |
download | execline-03157b1649b22dd06f0d0e1da464bee2d3a2811c.tar.xz |
bugfix: backtick segfaulted on empty remainder (thanks jjk)
-rw-r--r-- | src/execline/backtick.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/execline/backtick.c b/src/execline/backtick.c index 2661983..38ab0af 100644 --- a/src/execline/backtick.c +++ b/src/execline/backtick.c @@ -71,7 +71,7 @@ int main (int argc, char const **argv, char const *const *envp) if (!stralloc_cats(&modif, def)) strerr_diefu1sys(111, "stralloc_catb") ; } } - if (argc == argc1 - 1) return 0 ; + if (argc1 == argc - 1) return 0 ; if (!stralloc_0(&modif)) strerr_diefu1sys(111, "stralloc_catb") ; { unsigned int reallen = str_len(modif.s) ; |