mirror of
https://github.com/samba-team/samba.git
synced 2025-10-23 11:33:16 +03:00
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 commit is contained in:
committed by
Gerald (Jerry) Carter
parent
46e91f269c
commit
ebdd1393fd
@@ -88,7 +88,7 @@ static int ejs_blobToArray(MprVarHandle eid, int argc, struct MprVar **argv)
|
||||
goto failed;
|
||||
}
|
||||
|
||||
array = mprObject("array");
|
||||
array = mprArray("array");
|
||||
|
||||
for (i=0;i<blob->length;i++) {
|
||||
mprAddArray(&array, i, mprCreateNumberVar(blob->data[i]));
|
||||
|
||||
Reference in New Issue
Block a user