cmJson.c:cmJsonInserPairString() now passes NULL string value as 0 length string.

This commit is contained in:
kevin 2013-04-11 00:27:14 -07:00
parent c144c71349
commit 23fcfed2fb

View File

@ -2056,7 +2056,7 @@ cmJsRC_t cmJsonInsertPairReal( cmJsonH_t h, cmJsonNode_t* objectNodePtr,
}
cmJsRC_t cmJsonInsertPairString( cmJsonH_t h, cmJsonNode_t* objectNodePtr, const char* label, const char* stringVal )
{ return cmJsonInsertPairStringN(h,objectNodePtr,label,stringVal,strlen(stringVal)); }
{ return cmJsonInsertPairStringN(h,objectNodePtr,label,stringVal,stringVal==NULL ? 0 : strlen(stringVal)); }
cmJsRC_t cmJsonInsertPairStringN( cmJsonH_t h, cmJsonNode_t* objectNodePtr, const char* label, const char* stringVal, unsigned stringCharCnt )
{