Fix getrhs()

getrhs() must not interpret escapes, because in other case
addsub() will not be able to see the escaped characters.
This commit is contained in:
Roberto E. Vargas Caballero 2015-12-14 15:40:20 +01:00 committed by sin
parent 0cd385d164
commit a19aad7c70

6
ed.c
View File

@ -877,12 +877,6 @@ getrhs(int delim)
s = NULL; s = NULL;
siz = cap = 0; siz = cap = 0;
while ((c = input()) != '\n' && c != EOF && c != delim) { while ((c = input()) != '\n' && c != EOF && c != delim) {
if (c == '\\') {
if (isdigit(c = input())) {
back(c);
c = '\\';
}
}
s = addchar(c, s, &siz, &cap); s = addchar(c, s, &siz, &cap);
} }
s = addchar('\0', s, &siz, &cap); s = addchar('\0', s, &siz, &cap);