Commit Diff


commit - 71bf58261180540753b6cdd0bcbf2853f2152f1f
commit + 571961c9e466c35db245d8c5cbada8f0526bbcc5
blob - a126bcfcaf9cc7b1530ccc8a71bd68630f0e36d4
blob + 2e13ce7026229338201ef668997df1f5a175e0a1
--- mc5000.c
+++ mc5000.c
@@ -516,7 +516,7 @@ read_bytes(uint8_t *buf, int o, int n)
 	}
 	if (r < n)
 		errx(1, "%s: truncated message, %d/%d bytes", devfname,
-		    r + o, r + n);
+		    r + o, n + o);
 }
 
 struct message {