Browse Source

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

master
kevin 11 years ago
parent
commit
23fcfed2fb
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      cmJson.c

+ 1
- 1
cmJson.c View File

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

Loading…
Cancel
Save