diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-11 22:40:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:20:07 -0500 |
commit | ba1ee57df43fe93c8b650478324ddd6cc1a3c7bc (patch) | |
tree | 520287c2e17509ba1d9a9895b986a1a59a945e80 /source4/lib/ejs/ejsParser.c | |
parent | 3e5649f79f910c9cad96a362d679f34453e60fa9 (diff) | |
download | samba-ba1ee57df43fe93c8b650478324ddd6cc1a3c7bc.tar.gz samba-ba1ee57df43fe93c8b650478324ddd6cc1a3c7bc.tar.bz2 samba-ba1ee57df43fe93c8b650478324ddd6cc1a3c7bc.zip |
r8333: merged with latest upstream ejs sources
(This used to be commit b0f9ddafe95d4e8d846bc72a39e94d22da271348)
Diffstat (limited to 'source4/lib/ejs/ejsParser.c')
-rw-r--r-- | source4/lib/ejs/ejsParser.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/lib/ejs/ejsParser.c b/source4/lib/ejs/ejsParser.c index 72b0889c55..a5c40e593d 100644 --- a/source4/lib/ejs/ejsParser.c +++ b/source4/lib/ejs/ejsParser.c @@ -35,7 +35,7 @@ /********************************** Includes **********************************/ -#include "lib/ejs/ejsInternal.h" +#include "ejsInternal.h" #if BLD_FEATURE_EJS @@ -1128,9 +1128,11 @@ static int parseFunctionDec(Ejs *ep, int state, int flags) mprDestroyVar(&v); return EJS_STATE_ERR; } - - /* register the function name early to allow for recursive - function calls (see note in ECMA standard, page 71) */ + + /* + * Register the function name early to allow for recursive + * function calls (see note in ECMA standard, page 71) + */ if (!(flags & EJS_FLAGS_ASSIGNMENT)) { currentObj = ejsFindObj(ep, 0, procName, flags); vp = mprSetProperty(currentObj, procName, &v); @@ -2127,7 +2129,8 @@ static int evalFunction(Ejs *ep, MprVar *obj, int flags) * Run a function */ -int ejsRunFunction(int eid, MprVar *obj, const char *functionName, MprArray *args) +int ejsRunFunction(int eid, MprVar *obj, const char *functionName, + MprArray *args) { EjsProc proc, *saveProc; Ejs *ep; @@ -2284,7 +2287,8 @@ static void appendValue(MprVar *dest, MprVar *src) oldLen = strlen(oldBuf); buf = mprRealloc(oldBuf, (len + oldLen + 1) * sizeof(char)); dest->string = buf; - strncpy(&buf[oldLen], value, len+1); + strcpy(&buf[oldLen], value); + } else { *dest = mprCreateStringVar(value, 1); } |