From 6f82aa0c42ef2ed59ab7bd14eaa3f835e9ab212d Mon Sep 17 00:00:00 2001 From: Evan Gates Date: Thu, 12 Mar 2015 14:46:30 -0700 Subject: [PATCH] increment pointer by runelen(delim) not 1 --- sed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sed.c b/sed.c index bad7492..644d0c7 100644 --- a/sed.c +++ b/sed.c @@ -858,7 +858,7 @@ get_s_arg(Cmd *c, char *s) /* FIXME: different eregcomp that calls fatal */ eregcomp(c->u.s.re, s, 0); } - s = p + 1; + s = p + runelen(delim); } /* Replace */ @@ -892,7 +892,7 @@ get_s_arg(Cmd *c, char *s) if (gflags.s_cont) return p; - s = p + 1; + s = p + runelen(delim); /* Flags */ p = semicolon_arg(s = chomp(s)); -- 2.3.2