diff options
author | rsc <devnull@localhost> | 2005-03-18 21:52:19 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-03-18 21:52:19 +0000 |
commit | 611d815b8bef59d7479058c2a0becf4c5289a52b (patch) | |
tree | 5c5bb2ce5232a6567f44df8347b3a0bf57b42a37 /src/cmd | |
parent | d27787fba7902466d65ef03f737a63ce168f4aa1 (diff) | |
download | plan9port-611d815b8bef59d7479058c2a0becf4c5289a52b.tar.gz plan9port-611d815b8bef59d7479058c2a0becf4c5289a52b.tar.bz2 plan9port-611d815b8bef59d7479058c2a0becf4c5289a52b.zip |
bug fix from plan 9
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/sam/mesg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/sam/mesg.c b/src/cmd/sam/mesg.c index ec0aa858..8edd4b2a 100644 --- a/src/cmd/sam/mesg.c +++ b/src/cmd/sam/mesg.c @@ -398,8 +398,11 @@ inmesg(Tmesg type) setgenstr(f, p0, p1); for(l = 0; l<genstr.n; l++){ i = genstr.s[l]; - if(utfrune(".*+?(|)\\[]^$", i)) - Strinsert(&genstr, tmpcstr("\\"), l++); + if(utfrune(".*+?(|)\\[]^$", i)){ + str = tmpcstr("\\"); + Strinsert(&genstr, str, l++); + freetmpstr(str); + } } Straddc(&genstr, '\0'); nextmatch(f, &genstr, p1, 1); |