acme: fix Get of dir in nameless window (thanks Colton Lewis)
TBR=r https://codereview.appspot.com/89390043
This commit is contained in:
parent
2f902c4138
commit
d213189122
1 changed files with 1 additions and 1 deletions
|
|
@ -228,7 +228,7 @@ textload(Text *t, uint q0, char *file, int setqid)
|
|||
}
|
||||
t->w->isdir = TRUE;
|
||||
t->w->filemenu = FALSE;
|
||||
if(t->file->name[t->file->nname-1] != '/'){
|
||||
if(t->file->nname > 0 && t->file->name[t->file->nname-1] != '/'){
|
||||
rp = runemalloc(t->file->nname+1);
|
||||
runemove(rp, t->file->name, t->file->nname);
|
||||
rp[t->file->nname] = '/';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue