sandy

text editor
git clone git://git.suckless.org/sandy
Log | Files | Refs | README | LICENSE

commit b0631ca9a3754d1766aa885dda6c2493939c7639
parent bbd1af3ca68a5307abff1a2abb9d3ca3256e0d3e
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date:   Sat,  4 Jun 2011 00:52:09 +0200

Compile default regex so non-existing search does not segfault.
Diffstat:
sandy.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sandy.c b/sandy.c @@ -1124,8 +1124,8 @@ i_setup(void){ if(mkfifo(fifopath, (S_IRUSR|S_IWUSR)) !=0) i_die("FIFO already exists.\n"); if((fifofd = open(fifopath, O_RDONLY | O_NONBLOCK)) == -1) i_die("Can't open FIFO for reading.\n");; setenv(envs[EnvFifo], fifopath, 1); - /*regcomp(find_res[0], "", 0); - regcomp(find_res[1], "", 0); */ /* Comment out until regexes are universal */ + regcomp(find_res[0], "\0\0", 0); /* This should not match anything */ + regcomp(find_res[1], "\0\0", 0); initscr(); if(has_colors()) {