From 9242405c8fc31b869fecfe096f29eb1a2ca75bda Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 6 Nov 2024 22:33:48 +0300 Subject: fixed possible crashes during --fake-cmdline * A test case has been added, although it might have been accidental that on caused crashes. --- src/main.c | 6 ++---- tests/testsuite.at | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index e2c6b9e..d561d33 100644 --- a/src/main.c +++ b/src/main.c @@ -462,11 +462,9 @@ main(int argc, char **argv) teco_error_add_frame_toplevel(); goto error; } - goto cleanup; - } - - if (!teco_interface_event_loop(&error)) + } else if (!teco_interface_event_loop(&error)) { goto error; + } teco_machine_main_clear(&teco_cmdline.machine); memset(&teco_cmdline.machine, 0, sizeof(teco_cmdline.machine)); diff --git a/tests/testsuite.at b/tests/testsuite.at index 3ed4df8..3770bbe 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -234,6 +234,10 @@ AT_SETUP([Rub out of empty forward kill]) AT_CHECK([$SCITECO_CMDLINE "@I/F/ J @I/X/ @FK/F/{-6D} Z-2\"N(0/0)'"], 0, ignore, ignore) AT_CLEANUP +AT_SETUP([Searches from macro calls]) +AT_CHECK([$SCITECO_CMDLINE "@^Um{:@S/XXX/} :Mm\"S(0/0)' Mm\"S(0/0)'"], 0, ignore, ignore) +AT_CLEANUP + AT_BANNER([Known Bugs]) AT_SETUP([Number stack]) -- cgit v1.2.3