cmJson.c:cmJsonInserPairString() now passes NULL string value as 0 length string.
This commit is contained in:
parent
c144c71349
commit
23fcfed2fb
2
cmJson.c
2
cmJson.c
@ -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 )
|
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 )
|
cmJsRC_t cmJsonInsertPairStringN( cmJsonH_t h, cmJsonNode_t* objectNodePtr, const char* label, const char* stringVal, unsigned stringCharCnt )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user