Menu

#46 Incorrect boolean expression

v1.0 (example)
closed-fixed
None
5
2016-03-19
2015-10-13
No

When compiling cJSON_Util.c my compiler complained about this line, saying that it is always false:

if (!patches->type==cJSON_Array) return 1; / malformed patches. /

Looking at this line it looks like the intention was to write "!(patches->type==cJSON_Array)", not the way you see in the code.

I attached a patch!

1 Attachments

Discussion

  • Dave Gamble

    Dave Gamble - 2016-03-19

    Fixed upstream (thanks to kbranigan) at https://github.com/DaveGamble/cJSON

     
  • Dave Gamble

    Dave Gamble - 2016-03-19
    • status: unread --> closed-fixed
     

Log in to post a comment.