Small fix for sed 'y' command
authorGlenn L McGrath <bug1@ihug.co.nz>
Sun, 30 Mar 2003 08:40:09 +0000 (08:40 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Sun, 30 Mar 2003 08:40:09 +0000 (08:40 -0000)
editors/sed.c

index 4c535b1e3110f556e1ac4a9a5f4dd7f28d4cfbbf..13155a97eb6db6b03a5cee3a7cc36d95cec1a7d2 100644 (file)
@@ -343,7 +343,7 @@ static int parse_translate_cmd(sed_cmd_t * const sed_cmd, const char *cmdstr)
                sed_cmd->translate[i * 2] = match[i];
                sed_cmd->translate[(i * 2) + 1] = replace[i];
        }
-       return(idx);
+       return(idx + 1);
 }
 
 static int parse_edit_cmd(sed_cmd_t *sed_cmd, const char *editstr)