tfix q1 computation bug in expandfile(). only affects external programs - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 8057b1ce3fa3babe186407aa2ee9fafe2ce6d836
DIR parent 590c5b346fc5b973809c411da5f6e9f5804845a0
HTML Author: rsc <devnull@localhost>
Date: Mon, 21 Mar 2005 04:56:47 +0000
fix q1 computation bug in expandfile(). only affects external programs
Diffstat:
M src/cmd/acme/look.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
DIR diff --git a/src/cmd/acme/look.c b/src/cmd/acme/look.c
t@@ -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++;
}
}
t@@ -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++;