if (lhs->type == MPR_TYPE_STRING) {
if (isdigit((int) lhs->string[0])) {
num = mprVarToNumber(lhs);
+ lhs->allocatedVar = 0;
mprDestroyVar(lhs);
*lhs = mprCreateNumberVar(num);
/* Examine further below */
* Convert the RHS to a string
*/
mprVarToString(&str, MPR_MAX_STRING, 0, rhs);
+ rhs->allocatedVar = 0;
mprDestroyVar(rhs);
*rhs = mprCreateStringVar(str, 1);
mprFree(str);
for (prop = getObjChain(obj->properties, property); prop;
prop = prop->forw) {
- if (prop->name[0] == property[0] && strcmp(prop->name, property) == 0) {
+ if (prop->name &&
+ prop->name[0] == property[0] && strcmp(prop->name, property) == 0) {
break;
}
}