Thinko in s//options. (Whitespace skipping in the wrong place.)
authorRob Landley <rob@landley.net>
Sun, 4 Jan 2004 06:42:14 +0000 (06:42 -0000)
committerRob Landley <rob@landley.net>
Sun, 4 Jan 2004 06:42:14 +0000 (06:42 -0000)
editors/sed.c

index 5f58fe27aee939970685c6b5e9cf2db48fb2ea7b..a0d0cf74b7eb696f8448845406565c8bf199e256 100644 (file)
@@ -344,10 +344,11 @@ static int parse_subst_cmd(sed_cmd_t * const sed_cmd, char *substr)
                                sed_cmd->which_match=(unsigned short)strtol(substr+idx,&pos,10);
                                idx=pos-substr;
                        }
-                       /* Skip spaces */
-                       if(isspace(substr[idx])) continue;
                        continue;
                }
+               /* Skip spaces */
+               if(isspace(substr[idx])) continue;
+
                switch (substr[idx]) {
                        /* Replace all occurrences */
                        case 'g':