open-source-parsers / jsoncpp

A C++ library for interacting with JSON.
Other
8.06k stars 2.63k forks source link

added_check_for_nullptr #1523

Closed timurdigitaev closed 8 months ago

timurdigitaev commented 8 months ago

added check for nullptr

BillyDonahue commented 8 months ago

I don't agree with the change. If there's no output buffer, the function returns 0, which is not compliant with what vsnprintf does. https://linux.die.net/man/3/vsnprintf

Requirements for vsnprintf are that a buffer of the specified size must be provided, but size can be zero.

The braces are not in the project's indent style.