Skip to content

Commit

Permalink
crnlib: use snprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Jun 25, 2024
1 parent 998e180 commit 7fb66cc
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 @@ -37,7 +37,7 @@ bool elemental_vector::increase_capacity(uint min_new_capacity, bool grow_hint,
#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);
snprintf(buf, sizeof(buf), "vector: crnlib_realloc() failed allocating %u bytes", (uint)desired_size);
#endif
CRNLIB_FAIL(buf);
}
Expand All @@ -52,7 +52,7 @@ bool elemental_vector::increase_capacity(uint min_new_capacity, bool grow_hint,
#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);
snprintf(buf, sizeof(buf), "vector: crnlib_malloc() failed allocating %u bytes", (uint)desired_size);
#endif
CRNLIB_FAIL(buf);
}
Expand Down

0 comments on commit 7fb66cc

Please sign in to comment.