From f0032000a1608c65c0f2a110a744cee05b1d2412 Mon Sep 17 00:00:00 2001 From: nveid Date: Fri, 27 Oct 2006 04:53:49 +0000 Subject: [PATCH] progenvhotfix4 - the last register wasn't getting passed back from elist2arr. Z now passes along correctly. (cherry picked from commit 95cc0e8358f6148b7e977543e8498b0e300ee364) --- src/funlist.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/funlist.c b/src/funlist.c index c7becba..47f1c32 100644 --- a/src/funlist.c +++ b/src/funlist.c @@ -119,7 +119,7 @@ int elist2arr(char *r[], int max, char *list, char sep) { i = 0; /* Do first */ - while(p && *p && (i < max)) { + while(p && *p && (i <= max)) { if(*p == '\\' && (p + 1)) { /* Remove This Char & let the next char in */ *p++ = '\0'; @@ -139,9 +139,16 @@ int elist2arr(char *r[], int max, char *list, char sep) { } p++; } + /* Insert our final one.. */ + + if(lp != NULL) { + safe_str(lp, cbufp, &bp); + *bp = '\0'; + r[i] = cbufp; + } - return i; + return i+1; } -- 2.30.2