ed

simple ed
git clone git://git.2f30.org/ed
Log | Files | Refs | LICENSE

commit 238f7f10768030d8a0bc7a0659e1427b127129e2
parent 9fc0b5d959a1830d83e0226e9ecd1c0fe9f72653
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 12 Dec 2015 12:56:43 +0100

Fix small bug in subs()

The code was asuming that the character read was always
'\n', but it is not true, so the correct behaviour is
to back the 'c' variable.

Diffstat:
Med.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ed.c b/ed.c @@ -870,7 +870,7 @@ subs(void) getrhs(delim); if ((c = input()) == '\n') pflag = 'p'; - back('\n'); + back(c); } if ((c = input()) == 'g') {