summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--2048.c1
-rw-r--r--play.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/2048.c b/2048.c
index 9b8a3a4..fe17a30 100644
--- a/2048.c
+++ b/2048.c
@@ -240,6 +240,7 @@ static bool input(void) {
 		break; case 'k': case KEY_UP: if (up()) spawn();
 		break; case 'l': case KEY_RIGHT: if (right()) spawn();
 		break; case 'q': return false;
+		break; case ERR: exit(EXIT_FAILURE);
 	}
 	return true;
 }
diff --git a/play.c b/play.c
index 251e826..23011f6 100644
--- a/play.c
+++ b/play.c
@@ -124,7 +124,7 @@ static void draw(size_t new) {
 	);
 	mvhline(ScoresY + 1, ScoresX, '=', ScoresWidth);
 
-	int newY;
+	int newY = -1;
 	for (size_t i = 0; i < ScoresTop; ++i) {
 		if (!scores[i].score) break;
 		if (i == new) newY = ScoresY + 2 + i;
@@ -175,6 +175,7 @@ int main(void) {
 		fclose(file);
 	}
 
+	noecho();
 	curs_set(0);
 	getch();
 	endwin();
-08-27Add New Order — TemptationJune McEnroe 2018-08-26Add NetBSD to install.shJune McEnroe 2018-08-24Show hostname in title over SSHJune McEnroe 2018-08-23Alias bc='bc -l'June McEnroe 2018-08-20Update usage of scheme in READMEJune McEnroe 2018-08-20Use scheme.h in fbatt and fbclockJune McEnroe 2018-08-20Generate scheme.hJune McEnroe 2018-08-20Add dependencies on gfx.hJune McEnroe 2018-08-18Add Blondie — Heart of GlassJune McEnroe Why didn't I know about this song? I love it. 2018-08-18Set FCEDIT=$EDITORJune McEnroe 2018-08-18Only post commits with bodies to MastodonJune McEnroe 2018-08-18Run tf/cfg link script with /bin/shJune McEnroe 2018-08-18Run {,s,t}up with /bin/shJune McEnroe 2018-08-18Use whence instead of typeJune McEnroe type is an alias for whence -v and is more for human consumption. 2018-08-18Cut off path components until right prompt fitsJune McEnroe Keeps paths valid (from somehwere) rather than abrupt truncation. 2018-08-17Add "private" alias to source encrypted fileJune McEnroe Why is there no easy way to *edit* an encrypted file? 2018-08-17Add vim mapping to add a #includeJune McEnroe