shithub: vdir

Download patch

ref: e54d87be8a5d33e8b1ee3ea6c87b5d615ae9036c
parent: 1fb28675dbc5a1268b232782a508423010ea5823
author: phil9 <[email protected]>
date: Thu Oct 7 17:19:08 EDT 2021

fix crash caused by call to log(0) (thanks igor)

	my math teachers would not be proud :]

--- a/vdir.c
+++ b/vdir.c
@@ -124,7 +124,7 @@
 	qsort(dirs, ndirs, sizeof *dirs, (int(*)(void*,void*))dircmp);
 	offset = 0;
 	close(fd);
-	m = 0;
+	m = 1;
 	for(i=0; i < ndirs; i++){
 		if(dirs[i].length>m)
 			m=dirs[i].length;