From 4e7cb355f8e82e7d4d7c6bf6dd36a6d860a3e70f Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Tue, 29 Jan 2008 13:46:01 +0000 Subject: [PATCH]: allow empty strings in argument parser Max Kellermann --- iptables-restore.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'iptables-restore.c') diff --git a/iptables-restore.c b/iptables-restore.c index 2522b0f..44263ce 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -373,14 +373,12 @@ main(int argc, char *argv[]) for (curchar = parsestart; *curchar; curchar++) { char param_buffer[1024]; - if (escaped) { - param_buffer[param_len++] = *curchar; - escaped = 0; - continue; - } - if (quote_open) { - if (*curchar == '\\') { + if (escaped) { + param_buffer[param_len++] = *curchar; + escaped = 0; + continue; + } else if (*curchar == '\\') { escaped = 1; continue; } else if (*curchar == '"') { -- cgit v1.2.3