summaryrefslogtreecommitdiff
path: root/namedev_parse.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-26 02:52:04 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:39:48 -0700
commit77313cd0d13ed3682f25c745f71f648292b28215 (patch)
treeb8ed0937895499b6fc28daa4b67e46d6e1dfac97 /namedev_parse.c
parent9c020c60165997be842948d11f51ce6dd6b9b745 (diff)
[PATCH] namedev: skip backslashes only if followed by newline
Fix from: Hannes Reinecke <hare@suse.de> namedev_parse is a bit overzealous when in comes to handling backspaces; it always eats up backspaces regardless of anything beyond that. This means it is impossible to enter '\t' in a rule. Quite a bit of fun when you're trying to write regexps.
Diffstat (limited to 'namedev_parse.c')
-rw-r--r--namedev_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/namedev_parse.c b/namedev_parse.c
index 7cd676c390..02d8a6520c 100644
--- a/namedev_parse.c
+++ b/namedev_parse.c
@@ -153,7 +153,7 @@ static int namedev_parse(const char *filename, void *data)
/* skip backslash and newline from multi line rules */
for (i = j = 0; i < count; i++) {
- if (bufline[i] == '\\' || bufline[i] == '\n')
+ if (bufline[i] == '\\' && bufline[i+1] == '\n')
continue;
line[j++] = bufline[i];