From 3118fa91a9fcbe04db0f9f09e6439edcf4293703 Mon Sep 17 00:00:00 2001 From: Petter Rodhelind Date: Wed, 24 May 2017 14:32:49 +0200 Subject: Fix segfault when TAB in other places than body text --- src/cmd/acme/text.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cmd/acme') diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c index faa87d99..e1b52859 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -759,6 +759,8 @@ texttype(Text *t, Rune r) textshow(t, t->file->b.nc, t->file->b.nc, FALSE); return; case 0x09: /* ^I (TAB) */ + if(t->what!=Body) + break; if(t->w->tabexpand == TRUE){ for(i=0; i < t->w->body.tabstop; i++){ texttype(t, ' '); -- cgit v1.2.3