Skip to content

Commit

Permalink
crnlib: alays use sprintf_s (there is a non-MSVC implementation in cr…
Browse files Browse the repository at this point in the history
…nlib/crn_platform.cpp)
  • Loading branch information
illwieckz committed Jun 24, 2024
1 parent f59814e commit a610ffa
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions crnlib/crn_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ bool elemental_vector::increase_capacity(uint min_new_capacity, bool grow_hint,
return false;

char buf[256];
#ifdef _MSC_VER
sprintf_s(buf, sizeof(buf), "vector: crnlib_realloc() failed allocating %u bytes", (uint)desired_size);
#else
sprintf(buf, "vector: crnlib_realloc() failed allocating %u bytes", (uint)desired_size);
#endif
CRNLIB_FAIL(buf);
}
m_p = new_p;
Expand All @@ -49,11 +45,7 @@ bool elemental_vector::increase_capacity(uint min_new_capacity, bool grow_hint,
return false;

char buf[256];
#ifdef _MSC_VER
sprintf_s(buf, sizeof(buf), "vector: crnlib_malloc() failed allocating %u bytes", (uint)desired_size);
#else
sprintf(buf, "vector: crnlib_malloc() failed allocating %u bytes", (uint)desired_size);
#endif
CRNLIB_FAIL(buf);
}

Expand Down

0 comments on commit a610ffa

Please sign in to comment.