From cd177086cae75394b21dd44eff57c65783d3b4a8 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Mon, 25 Dec 2017 17:35:27 +0530 Subject: OpenSUSE gcc fails at '-fno-tree-loop-vectorize' --- nnn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nnn.c') diff --git a/nnn.c b/nnn.c index e467401..0b817ef 100644 --- a/nnn.c +++ b/nnn.c @@ -1182,10 +1182,12 @@ parsebmstr(char *bms) static char * get_bm_loc(char *key, char *buf) { + int r; + if (!key || !key[0]) return NULL; - for (int r = 0; bookmark[r].key && r < BM_MAX; ++r) { + for (r = 0; bookmark[r].key && r < BM_MAX; ++r) { if (xstrcmp(bookmark[r].key, key) == 0) { if (bookmark[r].loc[0] == '~') { char *home = getenv("HOME"); -- cgit v1.2.3-70-g09d2