[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] refactor sqMessageBox to void using toUnicode (4f6f191)

Nicolas Cellier notifications at github.com
Tue Jan 1 14:39:19 UTC 2019


You're right!
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l?view=vs-2017
`vsnprintf` always writes the NULL terminator, and we can pass `count=sizeof(buffer)` as C99 mandates.
`_vsnprintf` does not, so we must set the buffer to zero, and pass `count=sizeof(buffer)-1`.
The Microsoft specific API is much too complex!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4f6f191613f6bf6cdb989b39e1002cf4938f475c#commitcomment-31812755
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190101/796e9b58/attachment.html>


More information about the Vm-dev mailing list