|Subject:||Re: [libmicrohttpd] Can I get the entire MHD log without depends on C function like sprintf()?|
|Date:||Wed, 2 Mar 2016 23:11:05 -0300|
Silvio: What do you mean by „I can’t use vsnprintf(NULL, 0, fmt, args) on Pascal because it frees the arguments”? What frees what arguments?
Would it help to use “char buffer; vsnprintf(buffer, sizeof(buffer), fmt, args)”? (It still ought to return the total size you need). I’m not sure that passing NULL as the buffer is legal (even when the count is zero).
Also beware: I have a feeling that Visual Studio 2015 handles vsnprintf correctly for
overflow (in that it always nul-terminates), but earlier versions do not. Of course, if you are going to go round again and just allocate a large enough buffer, that doesn’t matter.
|[Prev in Thread]||Current Thread||[Next in Thread]|