From 21c9df5b2792abe1388ee7a4a847dbc7ce142012 Mon Sep 17 00:00:00 2001 From: Rei Date: Sun, 26 Jul 2015 17:57:05 +0200 Subject: [PATCH] Fixed random crashes and crash on group link request - (Random crashes) Fixed uninitialized variable prompt_was; please, use static variables to make life easier to everyone. - Removed duplicate line 2138. The print_start/print_end mechanism is weak, there's a lot of redundant code and bugs are hard to catch. --- interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/interface.c b/interface.c index ea5f4a1..78a158c 100644 --- a/interface.c +++ b/interface.c @@ -2135,7 +2135,6 @@ void print_string_gw (struct tgl_state *TLSR, void *extra, int success, const ch } if (!success) { print_fail (ev); return; } mprint_start (ev); - mprint_start (ev); if (!enable_json) { mprintf (ev, "%s\n", name); } else { @@ -3166,7 +3165,7 @@ int readline_active; int saved_point; char *saved_line; -int prompt_was; +static int prompt_was; void deactivate_readline (void) {