aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@adeprimo.se>2017-05-24 14:32:49 +0200
committerPetter Rodhelind <petter.rodhelind@adeprimo.se>2017-05-24 14:32:49 +0200
commit3118fa91a9fcbe04db0f9f09e6439edcf4293703 (patch)
treec57ef5d87f6c2317e3ab57036f54534668daf141 /src/cmd/acme
parent24f4035ccced0aff442561b2be15b215f3744c0a (diff)
downloadplan9port-3118fa91a9fcbe04db0f9f09e6439edcf4293703.tar.gz
plan9port-3118fa91a9fcbe04db0f9f09e6439edcf4293703.tar.bz2
plan9port-3118fa91a9fcbe04db0f9f09e6439edcf4293703.zip
Fix segfault when TAB in other places than body text
Diffstat (limited to 'src/cmd/acme')
-rw-r--r--src/cmd/acme/text.c2
1 files changed, 2 insertions, 0 deletions
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, ' ');