]> git.armaanb.net Git - bin.git/commitdiff
morse: switch unprintable character to ?
authorArmaan Bhojwani <me@armaanb.net>
Wed, 26 May 2021 14:17:58 +0000 (10:17 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 30 May 2021 04:43:41 +0000 (00:43 -0400)
morse.c

diff --git a/morse.c b/morse.c
index 27e0fa600d8913f52b91e77f487b1050819d9726..5f3f58941b3d13377ef7539adf2ade624a63747a 100644 (file)
--- 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 <string.h>
@@ -29,7 +29,7 @@ convert(char *c)
                        printf("%s", ma[i]);
                        break;
                } else if (i == sizeof(aa)/sizeof(char *) - 1) {
-                       printf("*");
+                       printf("?");
                }
        }
        printf(" ");