diff options
| author | Quentin Carbonneaux | 2014-07-20 22:21:42 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-07-20 22:21:42 -0400 |
| commit | 6d1da4517ff54c09de38516b4f274fa9316bbf10 (patch) | |
| tree | 9d5e70c8bbb0d31e9ced980e626ed63caa9fcd29 | |
| parent | 659d227cd1ec5c722ba405e203295ae88e32b402 (diff) | |
handle empty strings in ex_look
| -rw-r--r-- | exec.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -61,6 +61,8 @@ ex_look(W *w, Rune *s, unsigned n) { unsigned p; + if (n == 0) + return 1; p = eb_look(w->eb, w->cu+1, s, n); if (p == -1u) p = eb_look(w->eb, 0, s, n); |
