snprintf won't work correctly.
In some places Casey is using overloaded version with template (this is OK, and is compatible with snprintf):
| template <size_t size>
int _snprintf_s(
char (&buffer)[size],
size_t count,
const char *format [,
argument] ...
); // C++ only
|
But in other places he is using overloaded version with following prototype:
| int _snprintf_s(
char *buffer,
size_t sizeOfBuffer,
size_t count,
const char *format [,
argument] ...
);
|
This won't work with your snprintf.
Most reasonable option is just to implement both _snprintf_s yourself - I have code for that here:
https://hero.handmadedev.org/foru...y-211-gcc-clang-build-report#5277
Or pitch Casey to use regular snprintf function (not _snprintf_s function). And use _CRT_SECURE_NO_DEPRECATE define to avoid warnings. I tried that, but he forgot about this define.