diff options
Diffstat (limited to 'src/cmd/sam')
-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); |