From 783851099b43236666b2fc0cc866834773d6e7b7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 2 Nov 2005 01:04:00 +0000 Subject: 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) --- source4/scripting/libjs/management.js | 3 +-- source4/scripting/libjs/winreg.js | 13 +++---------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'source4/scripting/libjs') diff --git a/source4/scripting/libjs/management.js b/source4/scripting/libjs/management.js index 26c1c0a34a..1258368e90 100644 --- a/source4/scripting/libjs/management.js +++ b/source4/scripting/libjs/management.js @@ -24,7 +24,7 @@ function smbsrv_sessions() } /* gather the results into a single array */ - var i, count=0, ret = new Object(); + var i, count=0, ret = new Array(0); for (i=0;i