shithub: riscv

Download patch

ref: 70a168206b7bdc1410abb0702c88e334bf5cff95
parent: 1a81fb86eb713f3e98a71522259d843e8cc14995
author: aiju <[email protected]>
date: Mon May 16 18:16:07 EDT 2011

fixed [45]s

--- a/sys/src/games/xs.c
+++ b/sys/src/games/xs.c
@@ -848,7 +848,7 @@
 	snprint(buf, sizeof(buf), "/sys/games/lib/%dscores", N);
 	scores = open(buf, OWRITE);
 	if(scores < 0)
-		sysfatal("can't open %s: %r", buf);
+		print("can't open %s: %r\n", buf);
 	tb = 0;
 	if(screen->depth < 3){
 		tb = allocimage(display, Rect(0,0,16,16), 0, 1, -1);
@@ -881,7 +881,7 @@
 	points = 0;
 	memset(board, 0, sizeof(board));
 	redraw(0);
-	if(play()){
+	if(play() && scores >= 0){
 		endtime = time(0);
 		fprint(scores, "%ld\t%s\t%lud\t%ld\n",
 			points, getuser(), starttime, endtime-starttime);