mirror of
https://github.com/wownero/wownero.git
synced 2026-11-13 03:43:54 +01:00
Merge pull request #10560
2e8a391 src: replace deprecated sprintf calls (selsta)
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ namespace hw {
|
||||
void buffer_to_str(char *to_buff, size_t to_len, const char *buff, size_t len) {
|
||||
CHECK_AND_ASSERT_THROW_MES(to_len > (len*2), "destination buffer too short. At least" << (len*2+1) << " bytes required");
|
||||
for (size_t i=0; i<len; i++) {
|
||||
sprintf(to_buff+2*i, "%.02x", (unsigned char)buff[i]);
|
||||
snprintf(to_buff + 2 * i, to_len - 2 * i, "%.02x", (unsigned char)buff[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user