summaryrefslogtreecommitdiff
path: root/functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'functions.c')
-rw-r--r--functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions.c b/functions.c
index 86a1f03..56b37d6 100644
--- a/functions.c
+++ b/functions.c
@@ -41,7 +41,7 @@ int getstdin(char *prompt, char *buff, size_t sz) {
// Append CR-LF to the end of a string (after cleaning up any existing trailing CR or LF)
void appendcrlf(char *string) {
// Make sure it doesn't already end with CR or LF
- while (string[strlen(string) - 1] == '\r' || string[strlen(string) - 1] == '\r') {
+ while (string[strlen(string) - 1] == '\r' || string[strlen(string) - 1] == '\n') {
string[strlen(string) - 1] = '\0';
}