Module Name: src
Committed By: christos
Date: Thu Nov 29 03:10:20 UTC 2018
Modified Files:
src/lib/libedit: parse.c
Log Message:
Fix off by one <tsahara at iij>
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libedit/parse.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libedit/parse.c
diff -u src/lib/libedit/parse.c:1.40 src/lib/libedit/parse.c:1.41
--- src/lib/libedit/parse.c:1.40 Mon May 9 17:46:56 2016
+++ src/lib/libedit/parse.c Wed Nov 28 22:10:20 2018
@@ -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
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;