shithub: Nail

Download patch

ref: 5924afea6a78723f097830797da04579b6aaeb81
parent: 0856ccae6253c2c24fde317dd146b15a8bf2e6f0
author: Ori Bernstein <[email protected]>
date: Wed Nov 4 00:33:57 EST 2020

fix fromcolon formatting: no stray spaces

--- a/mesg.c
+++ b/mesg.c
@@ -66,7 +66,7 @@
 {
 	char *r;
 
-	if(s != nil && m->from != nil){
+	if(s != nil && strlen(m->from) != 0){
 		r = smprint("%s <%s>", s, m->from);
 		free(s);
 		return r;
@@ -111,7 +111,7 @@
 	/* m->size = */ free(line(p, &p, 1));
 	m->mflags = line(p, &p, 0);
 	/* m->fileid = */ free(line(p, &p, 1));
-	m->fromcolon = fc(m, line(p, &p, 0));
+	m->fromcolon = fc(m, line(p, &p, 1));
 	free(info);
 
 	m->flags = Funseen;