Skip to content

Commit

Permalink
crnlib: 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 8d33340 commit e1c0c8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crnlib/crn_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ bool elemental_vector::increase_capacity(uint min_new_capacity, bool grow_hint,
return false;

char buf[256];
#ifdef _MSC_VER
#if defined(_WIN32) || defined(_MSC_VER)
sprintf_s(buf, sizeof(buf), "vector: crnlib_realloc() failed allocating %u bytes", (uint)desired_size);
#else
snprintf(buf, sizeof(buf), "vector: crnlib_realloc() failed allocating %u bytes", (uint)desired_size);
Expand All @@ -49,7 +49,7 @@ bool elemental_vector::increase_capacity(uint min_new_capacity, bool grow_hint,
return false;

char buf[256];
#ifdef _MSC_VER
#if defined(_WIN32) || defined(_MSC_VER)
sprintf_s(buf, sizeof(buf), "vector: crnlib_malloc() failed allocating %u bytes", (uint)desired_size);
#else
snprintf(buf, sizeof(buf), "vector: crnlib_malloc() failed allocating %u bytes", (uint)desired_size);
Expand Down

0 comments on commit e1c0c8a

Please sign in to comment.