Skip to content

Commit

Permalink
fix: change go empty json string to null.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed Dec 8, 2023
1 parent 5683e33 commit a3cd606
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions c_cpp_wrapper/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ void Call_CB_S_I_S_S(CB_S_I_S_S func,char* operationID, int errCode,char* errMsg
if (strcmp(data, "\"\"") == 0) {
strcpy(data, "");
}
if (strlen(errMsg) != 0 && errMsg[strlen(errMsg) - 1] != '\0') {
printf("ttttt %s\n",errMsg);
strncat(errMsg, "\0", 1);
}
func(operationID,errCode,errMsg,data);
if (errMsg != NULL && errMsg[0] != '\0')
{
Expand Down

0 comments on commit a3cd606

Please sign in to comment.