From 43355dbec3d1e3f5e17331b9d10e8fffee843548 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Wed, 26 May 2021 10:17:58 -0400 Subject: [PATCH] morse: switch unprintable character to ? --- morse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morse.c b/morse.c index 27e0fa6..5f3f589 100644 --- a/morse.c +++ b/morse.c @@ -1,5 +1,5 @@ /* Convert ASCII to morse code. Reads from stdin if provided with no argument - or "-", otherwise reads from the first command line argument. Prints "*" if + or "-", otherwise reads from the first command line argument. Prints "?" if character is not found. */ #include @@ -29,7 +29,7 @@ convert(char *c) printf("%s", ma[i]); break; } else if (i == sizeof(aa)/sizeof(char *) - 1) { - printf("*"); + printf("?"); } } printf(" "); -- 2.39.2