Browse Source

Fix lint

master
Arun Prakash Jana 4 years ago
parent
commit
d1fcc5351e
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/nnn.c

+ 5
- 1
src/nnn.c View File

@@ -2921,6 +2921,10 @@ static bool parsekvpair(kv **arr, char **envcpy, const uchar id, ushort *items)
kvarr = *arr;

*envcpy = strdup(ptr);
if (!*envcpy) {
xerror();
return FALSE;
}
ptr = *envcpy;
nextkey = ptr;

@@ -2948,7 +2952,7 @@ static bool parsekvpair(kv **arr, char **envcpy, const uchar id, ushort *items)
}

if (i < maxitems) {
if (*kvarr[i - 1].val == '\0')
if (kvarr[i - 1].val && *kvarr[i - 1].val == '\0')
return FALSE;
kvarr[i].key = '\0';
}


Loading…
Cancel
Save