Mercurial > hg > octave-lojdl
changeset 1898:750e5d190404
[project @ 1996-02-09 17:39:48 by jwe]
author | jwe |
---|---|
date | Fri, 09 Feb 1996 17:39:48 +0000 |
parents | b38c10272c3b |
children | 2f19333b1e72 |
files | src/input.cc |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/input.cc +++ b/src/input.cc @@ -401,7 +401,16 @@ if (using_readline) { - retval = ::readline (s); + char *tmp = retval = ::readline (s); + + if (tmp) + { + int len = strlen (tmp); + retval = (char *) malloc (len + 2); + strcpy (retval, tmp); + retval[len] = '\n'; + retval[len+1] = '\0'; + } } else {