summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/smbcalls_string.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-02 01:04:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:39 -0500
commit783851099b43236666b2fc0cc866834773d6e7b7 (patch)
tree277745750144e4e326ae1ad6e246daba042c332c /source4/scripting/ejs/smbcalls_string.c
parente8c23e4e2d9aab7fcf0e7653756c84ef6cf34ed6 (diff)
downloadsamba-783851099b43236666b2fc0cc866834773d6e7b7.tar.gz
samba-783851099b43236666b2fc0cc866834773d6e7b7.tar.bz2
samba-783851099b43236666b2fc0cc866834773d6e7b7.zip
r11458: fixed our ejs smbscript interfaces to use arrays where appropriate. In
js arrays are a special type of object where the length property is automatic, and cannot be modified manually. Our code was manually setting length, which made it abort when someone passed in a real ejs array. To fix this we need to create real arrays instead of objects, and remove the code that manually sets the length (This used to be commit ebdd1393fde44a0a35446d1a922d29a7c1769ba7)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_string.c')
-rw-r--r--source4/scripting/ejs/smbcalls_string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/scripting/ejs/smbcalls_string.c b/source4/scripting/ejs/smbcalls_string.c
index 5976e42251..e9e6e148d1 100644
--- a/source4/scripting/ejs/smbcalls_string.c
+++ b/source4/scripting/ejs/smbcalls_string.c
@@ -109,7 +109,7 @@ static int ejs_split(MprVarHandle eid, int argc, char **argv)
separator = argv[0];
s = argv[1];
- ret = mprObject("list");
+ ret = mprArray("list");
while ((p = strstr(s, separator))) {
char *s2 = talloc_strndup(tmp_ctx, s, (int)(p-s));