summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/pattern.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/pattern.c b/Src/pattern.c
index 1033c776f..ed88bb7ce 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -1552,8 +1552,10 @@ pattryrefs(Patprog prog, char *string, int stringlen, int unmetalen,
 	*nump = 0;
     }
     /* inherited from domatch, but why, exactly? */
-    if (*string == Nularg)
+    if (*string == Nularg) {
 	string++;
+	unmetalen--;
+    }
 
     if (stringlen < 0)
 	stringlen = strlen(string);