about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/cond.c2
-rw-r--r--Src/loop.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Src/cond.c b/Src/cond.c
index 8a54eeeb2..b34a14be1 100644
--- a/Src/cond.c
+++ b/Src/cond.c
@@ -202,7 +202,7 @@ evalcond(Estate state)
 		char *opat;
 		int save;
 
-		right = opat = dupstring(ecrawstr(state->prog, state->pc,
+		right = dupstring(opat = ecrawstr(state->prog, state->pc,
 						  &htok));
 		if (htok)
 		    singsub(&right);
diff --git a/Src/loop.c b/Src/loop.c
index 38eeda7d6..57ee11695 100644
--- a/Src/loop.c
+++ b/Src/loop.c
@@ -543,7 +543,7 @@ execcase(Estate state, int do_exec)
 	if (isset(XTRACE)) {
 	    char *pat2, *opat;
 
-	    opat = pat = ecgetstr(state, EC_DUP, NULL);
+	    pat = dupstring(opat = ecrawstr(state->prog, state->pc, NULL));
 	    singsub(&pat);
 	    save = (!(state->prog->flags & EF_HEAP) &&
 		    !strcmp(pat, opat) && *spprog != dummy_patprog2);
@@ -565,7 +565,7 @@ execcase(Estate state, int do_exec)
 		char *opat;
 		int htok = 0;
 
-		opat = pat = dupstring(ecrawstr(state->prog,
+		pat = dupstring(opat = ecrawstr(state->prog,
 						state->pc - 2, &htok));
 		if (htok)
 		    singsub(&pat);