Skip to content

Commit

Permalink
MSVC's version of snprintf is called _snprintf_s
Browse files Browse the repository at this point in the history
  • Loading branch information
codemercenary committed Jul 30, 2014
1 parent de56838 commit 6588d00
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contrib/json11/json11.cpp
Expand Up @@ -36,6 +36,11 @@ using std::make_shared;
using std::initializer_list;
using std::move;

#ifdef _MSC_VER
// MSVC has funny names for snprintf, we just use it instead
#define snprintf(str, size, format, ...) _snprintf_s(str, size, _TRUNCATE, format, __VA_ARGS__)
#endif

/* * * * * * * * * * * * * * * * * * * *
* Serialization
*/
Expand Down

0 comments on commit 6588d00

Please sign in to comment.