From: nveid Date: Fri, 27 Oct 2006 04:53:49 +0000 (+0000) Subject: progenvhotfix4 - the last register wasn't getting passed back from X-Git-Tag: 0.73~223 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=95cc0e8358f6148b7e977543e8498b0e300ee364;p=cobramush.git progenvhotfix4 - the last register wasn't getting passed back from elist2arr. Z now passes along correctly. --- 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; }