shithub: riscv

Download patch

ref: 5fd2e746e1a2a00d2acbc0c3b1924b1ea22101e8
parent: 0b094303f3e30007fd9fccc3df81f44cf2c49003
parent: dfbf774bbba142ef4286c4e230475e5eedcf46d6
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Oct 17 17:30:10 EDT 2020

merge

--- a/sys/src/games/nes/nes.c
+++ b/sys/src/games/nes/nes.c
@@ -85,7 +85,7 @@
 		chr = malloc(nchr * CHRSZ);
 		if(chr == nil)
 			sysfatal("malloc: %r");
-		if(readn(fd, chr, nchr * CHRSZ) < nchr * CHRSZ)
+		if(readn(fd, chr, nchr * CHRSZ) < 1)
 			sysfatal("read: %r");
 	}else{
 		nchr = 1;