r8742: fixed handling of zero length names in mprObject()
authorAndrew Tridgell <tridge@samba.org>
Mon, 25 Jul 2005 02:23:04 +0000 (02:23 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:30:00 +0000 (13:30 -0500)
(This used to be commit 8086c37df65ac666aa340141d3584e9bc2c81278)

source4/scripting/ejs/mprutil.c

index 99eff802766bc557f92491146fd72c418049e8f7..5a29ddc144a32aff6c1da157a54eb6e830f4e8bf 100644 (file)
@@ -29,7 +29,7 @@
 */
 struct MprVar mprObject(const char *name)
 {
-       return ejsCreateObj(name?name:"(NULL)", MPR_DEFAULT_HASH_SIZE);
+       return ejsCreateObj(name && *name?name:"(NULL)", MPR_DEFAULT_HASH_SIZE);
 }
 
 /*