diff options
Diffstat (limited to 'sed.c')
-rw-r--r-- | sed.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -154,6 +154,9 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege | |||
154 | { | 154 | { |
155 | char *my_str = strdup(str); | 155 | char *my_str = strdup(str); |
156 | int idx = 0; | 156 | int idx = 0; |
157 | char olddelimiter; | ||
158 | olddelimiter = sed_cmd->delimiter; | ||
159 | sed_cmd->delimiter = '/'; | ||
157 | 160 | ||
158 | if (isdigit(my_str[idx])) { | 161 | if (isdigit(my_str[idx])) { |
159 | do { | 162 | do { |
@@ -182,6 +185,7 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege | |||
182 | } | 185 | } |
183 | 186 | ||
184 | free(my_str); | 187 | free(my_str); |
188 | sed_cmd->delimiter = olddelimiter; | ||
185 | return idx; | 189 | return idx; |
186 | } | 190 | } |
187 | 191 | ||