aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-03-21 04:56:47 +0000
committerrsc <devnull@localhost>2005-03-21 04:56:47 +0000
commit8057b1ce3fa3babe186407aa2ee9fafe2ce6d836 (patch)
tree64af6e951126cb98763117aa20f51a412d1481e5 /src/cmd/acme
parent590c5b346fc5b973809c411da5f6e9f5804845a0 (diff)
downloadplan9port-8057b1ce3fa3babe186407aa2ee9fafe2ce6d836.tar.gz
plan9port-8057b1ce3fa3babe186407aa2ee9fafe2ce6d836.tar.bz2
plan9port-8057b1ce3fa3babe186407aa2ee9fafe2ce6d836.zip
fix q1 computation bug in expandfile(). only affects external programs
Diffstat (limited to 'src/cmd/acme')
-rw-r--r--src/cmd/acme/look.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/acme/look.c b/src/cmd/acme/look.c
index 65ee15c9..790e6c26 100644
--- a/src/cmd/acme/look.c
+++ b/src/cmd/acme/look.c
@@ -521,7 +521,7 @@ expandfile(Text *t, uint q0, uint q1, Expand *e)
q1 = colon;
if(colon<t->file->b.nc-1 && isaddrc(textreadc(t, colon+1))){
q1 = colon+1;
- while(q1<t->file->b.nc-1 && isaddrc(textreadc(t, q1)))
+ while(q1<t->file->b.nc && isaddrc(textreadc(t, q1)))
q1++;
}
}
@@ -626,7 +626,6 @@ expand(Text *t, uint q0, uint q1, Expand *e)
if(expandfile(t, q0, q1, e))
return TRUE;
-
if(q0 == q1){
while(q1<t->file->b.nc && isalnum(textreadc(t, q1)))
q1++;