netmail-open / wjelement

advanced, flexible JSON manipulation in C
GNU Lesser General Public License v3.0
108 stars 56 forks source link

WJWNull returns "FALSE" when succeeds #103

Open GlebPlekhotko opened 3 years ago

GlebPlekhotko commented 3 years ago

If WJWNull is called with non-null "name" argument, it returns "FALSE", though name is created:

result = WJWNull("error", wjWriter);

Looks like error is caused by line 894: return(6 == WJWrite(doc, ":null", 5));

Argument ":null" is 5 bytes long, WJWrite returns 5, but it is compared with "6".