Commit 6d244c69ce0d6130ac77c8f0fe3f80aeaaf618a5
Fix crash after failed global search
Steps to reproduce:
1. `pinfo flex`
2. "s" to activate global search
3. Enter `{-}` and press Enter
Author: xaizek
Author date (UTC): 2017-10-15 11:55
Committer name: xaizek
Committer date (UTC): 2019-02-02 12:08
Parent(s): 02f849b2a6839f79b78f08ab4343739e4e1202d0
Signing key: 99DC5E4DB05F6BE2
Tree: 37584b7366f31030daaaa4fcebb7803be9dec1da
File src/regexp_search.c changed (mode: 100644) (index f6756c2..cfc0b91) |
... |
... |
__regexp_search(char *pattern, char *string) |
72 |
72 |
/* invalid regexp */ |
/* invalid regexp */ |
73 |
73 |
if (regcomp(&h_regexp[pinfo_re_offset], pattern, flags)) |
if (regcomp(&h_regexp[pinfo_re_offset], pattern, flags)) |
74 |
74 |
{ |
{ |
75 |
|
return 0; |
|
|
75 |
|
return -1; |
76 |
76 |
} |
} |
77 |
77 |
old_pattern = strdup(pattern); |
old_pattern = strdup(pattern); |
78 |
78 |
old_type = match_type; |
old_type = match_type; |