Skip to content

Commit

Permalink
inc: use sprintf_s on MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Jun 25, 2024
1 parent e1c0c8a commit 171ac66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/crn_decomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ namespace crnd {
void crnd_assert(const char* pExp, const char* pFile, unsigned line) {
char buf[512];

#if defined(WIN32) && defined(_MSC_VER)
#if defined(_WIN32) || defined(_MSC_VER)
sprintf_s(buf, sizeof(buf), "%s(%u): Assertion failure: \"%s\"\n", pFile, line, pExp);
#else
snprintf(buf, sizeof(buf), "%s(%u): Assertion failure: \"%s\"\n", pFile, line, pExp);
Expand All @@ -1616,7 +1616,7 @@ void crnd_assert(const char* pExp, const char* pFile, unsigned line) {
void crnd_trace(const char* pFmt, va_list args) {
if (crnd_is_debugger_present()) {
char buf[512];
#if defined(WIN32) && defined(_MSC_VER)
#if defined(_WIN32) || defined(_MSC_VER)
vsprintf_s(buf, sizeof(buf), pFmt, args);
#else
vsnprintf(buf, sizeof(buf), pFmt, args);
Expand Down

0 comments on commit 171ac66

Please sign in to comment.