shithub: nvi

Download patch

ref: 4b848ca8ff8f9b15c210b9e54cf311dfe8a7e3f6
parent: 8e0c7cffe473f079212b225efd70036bd3f4617c
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Jun 22 16:36:57 EDT 2021

fix crash when quality is nil

--- a/nvi.c
+++ b/nvi.c
@@ -110,7 +110,7 @@
 			if(ba == nil)
 				ba = f;
 			for(i = 0; i < nida && fa == nil; i++){
-				if((alldigit(ida[i]) && atoi(ida[i]) == f->id) || strcmp(f->quality, ida[i]) == 0){
+				if((alldigit(ida[i]) && atoi(ida[i]) == f->id) || (f->quality != nil && strcmp(f->quality, ida[i]) == 0)){
 					fa = f;
 					break;
 				}