summaryrefslogtreecommitdiff
path: root/editors/sed.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/sed.c')
-rw-r--r--editors/sed.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 0f0f4a2..a18f6e5 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -154,6 +154,9 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege
{
char *my_str = strdup(str);
int idx = 0;
+ char olddelimiter;
+ olddelimiter = sed_cmd->delimiter;
+ sed_cmd->delimiter = '/';
if (isdigit(my_str[idx])) {
do {
@@ -182,6 +185,7 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege
}
free(my_str);
+ sed_cmd->delimiter = olddelimiter;
return idx;
}