shithub: riscv

Download patch

ref: 72f76091067db6112c33bc903da34a1dce7d0bac
parent: 806f97a47b461a8389d91b29f5cd5345774f84b0
author: Sigrid <[email protected]>
date: Tue Jan 12 08:32:38 EST 2021

cal: fix -s 7

--- a/sys/src/cmd/cal.c
+++ b/sys/src/cmd/cal.c
@@ -54,6 +54,7 @@
 		wstart = atoi(EARGF(usage()));
 		if(wstart < 0 || wstart > 7)
 			usage();
+		wstart %= 7;
 		break;
 	default:
 		usage();