src/nnn.c | 11 ++++++----- diff --git a/src/nnn.c b/src/nnn.c index 1b3427e9bdfb04c9d4a500d1438f7a3137c4c85f..3d07cb13fe28d09611c7d30f0b65950780ee67be 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3010,7 +3010,7 @@ } static bool parsekvpair(kv **arr, char **envcpy, const uchar id, uchar *items) { - bool next = TRUE; + bool new = TRUE; const uchar INCR = 8; uint i = 0; kv *kvarr = NULL; @@ -3028,7 +3028,7 @@ ptr = *envcpy; while (*ptr && i < 100) { - if (next) { + if (new) { if (!(i & (INCR - 1))) { kvarr = xrealloc(kvarr, sizeof(kv) * (i + INCR)); *arr = kvarr; @@ -3043,13 +3043,14 @@ if (*++ptr != ':' || *++ptr == '\0' || *ptr == ';') return FALSE; kvarr[i].off = ptr - *envcpy; ++i; + + new = FALSE; } if (*ptr == ';') { *ptr = '\0'; - next = TRUE; - } else if (next) - next = FALSE; + new = TRUE; + } ++ptr; }