diff options
| author | christos <christos@NetBSD.org> | 2018-11-29 03:10:20 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2018-11-29 03:10:20 +0000 |
| commit | 290bae4d3f19d120b2dee49d9b5c03413ba64eff (patch) | |
| tree | 26e2fe7af6c5e2e81f270261184e661b7139ef3f /lib/libedit/parse.c | |
| parent | 141878689588d9f7f5c151220950f60c3d6e41ea (diff) | |
Fix off by one <tsahara at iij>
Diffstat (limited to 'lib/libedit/parse.c')
| -rw-r--r-- | lib/libedit/parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libedit/parse.c b/lib/libedit/parse.c index fdd0d847a79..75c611e85e1 100644 --- a/lib/libedit/parse.c +++ b/lib/libedit/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.40 2016/05/09 21:46:56 christos Exp $ */ +/* $NetBSD: parse.c,v 1.41 2018/11/29 03:10:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: parse.c,v 1.40 2016/05/09 21:46:56 christos Exp $"); +__RCSID("$NetBSD: parse.c,v 1.41 2018/11/29 03:10:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -111,7 +111,7 @@ el_wparse(EditLine *el, int argc, const wchar_t *argv[]) if (ptr == argv[0]) return 0; - l = (size_t)(ptr - argv[0] - 1); + l = (size_t)(ptr - argv[0]); tprog = el_malloc((l + 1) * sizeof(*tprog)); if (tprog == NULL) return 0; |
