tbug fix from plan 9 - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 611d815b8bef59d7479058c2a0becf4c5289a52b
(DIR) parent d27787fba7902466d65ef03f737a63ce168f4aa1
(HTM) Author: rsc <devnull@localhost>
Date: Fri, 18 Mar 2005 21:52:19 +0000
bug fix from plan 9
Diffstat:
M src/cmd/sam/mesg.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/cmd/sam/mesg.c b/src/cmd/sam/mesg.c
t@@ -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);