Grab fix from upstream for incorrect error msg display. http://bugs.gentoo.org/96009 Index: regexp.c =================================================================== RCS file: /cvsroot/sed/sed/sed/regexp.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- sed/regexp.c 27 Jan 2005 08:04:30 -0000 1.3 +++ sed/regexp.c 10 Feb 2005 09:54:50 -0000 1.4 @@ -113,7 +113,7 @@ { char buf[200]; sprintf(buf, _("invalid reference \\%d on `s' command's RHS"), - needed_sub); + needed_sub - 1); bad_prog(buf); } }