aboutsummaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index a884f78..088b4ca 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -75,7 +75,11 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
exit(0);
}
+
/* Evaluate the command line */
+ // trim \n
+ if(cmdline[strlen(cmdline)-1] == '\n')
+ cmdline[strlen(cmdline)-1] = '\0';
eval(cmdline);
fflush(stdout);
fflush(stdout);