about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/mthr5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/mthr b/contrib/mthr
index 8dd01d6..2c4038c 100755
--- a/contrib/mthr
+++ b/contrib/mthr
@@ -33,8 +33,9 @@ mode==2 && ind <= dep { sel = 0 }
 }
 mode==2 && sel { print }
 mode==3 && sel {
-	print parents[ind-1]
-                 sel = 0
+	if (ind>0)
+		print parents[ind-1]
+	sel = 0
 }
 mode==3 {parents[ind] = $0 }
 ' - $(mseq $@)