ref: dfbf774bbba142ef4286c4e230475e5eedcf46d6
parent: d310da13ba8d31c84978f96f542b9929a4e54ed8
author: Sigrid <ftrvxmtrx@gmail.com>
date: Thu Oct 15 06:30:40 EDT 2020
games/nes: workaround for truncated chr
--- 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;