shithub: nvi

Download patch

ref: 8e0c7cffe473f079212b225efd70036bd3f4617c
parent: 265d50f4d363db60765b30697cd1c920190fd6ca
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Jun 22 16:33:24 EDT 2021

fix wrong fun used

--- a/nvi.c
+++ b/nvi.c
@@ -76,11 +76,12 @@
 
 	if(argc != 1)
 		usage();
-	if(strstr(argv[0], "youtu") != nil && (vid = strrchr(argv[0], '/')) != nil){
-		vid++;
-	}else{
-		vid = argv[0];
-		fun = peertube;
+	vid = argv[0];
+	if(strncmp(argv[0], "http", 4) == 0){
+		if(strstr(argv[0], "youtu") != nil && (vid = strrchr(argv[0], '/')) != nil)
+			vid++;
+		else
+			fun = peertube;
 	}
 
 	if((info = fun(vid)) == nil)