shithub: riscv

Download patch

ref: 2b4f4f88aa9f86ad4836a08611d2027616b9ca8b
parent: 5c7b6ccdc4863f8c32f9e311c33b1fc00ee1f456
author: Jacob Moody <moody@posixcafe.org>
date: Wed May 3 12:51:41 EDT 2023

diff: fix suicide if binary files don't diff

--- a/sys/src/cmd/diff/diffreg.c
+++ b/sys/src/cmd/diff/diffreg.c
@@ -356,10 +356,10 @@
 {
 	int m, i0, i1, j0, j1;
 
-	if(d->bindiff){
+	if(d->bindiff)
 		print("binary files %s %s differ\n", d->file1, d->file2);
+	if(d->binary)
 		return;
-	}
 	m = d->len[0];
 	d->J[0] = 0;
 	d->J[m+1] = d->len[1]+1;