summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-12-26 18:21:53 -0500
committerJune McEnroe <june@causal.agency>2018-12-26 18:21:53 -0500
commite01a1cb23910c1d31bc497782a4646c988543a05 (patch)
treeda3390b41f9d572a8814cec0033ea44b554d2636
parentShow adjacent scores when not in top (diff)
downloadplay-e01a1cb23910c1d31bc497782a4646c988543a05.tar.gz
play-e01a1cb23910c1d31bc497782a4646c988543a05.zip
Replace control chars with blanks in name
-rw-r--r--play.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/play.c b/play.c
index c5310ff..251e826 100644
--- a/play.c
+++ b/play.c
@@ -164,6 +164,9 @@ int main(void) {
 	if (index < ScoresLen) {
 		attr_set(A_BOLD, 0, NULL);
 		getnstr(new.name, sizeof(new.name) - 1);
+		for (char *ch = new.name; *ch; ++ch) {
+			if (*ch < ' ') *ch = ' ';
+		}
 
 		scoresLock(file);
 		scoresRead(file);