summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-09 20:42:49 +0200
committerLioncash <mathew1800@gmail.com>2018-10-09 20:46:26 +0200
commit8723cc87982825754f314b0c18910319a3ced716 (patch)
tree8b6446d7ff58f9c272202024dfe53a1831517b76
parentMerge pull request #1423 from DarkLordZach/romfs-file-exts (diff)
downloadyuzu-8723cc87982825754f314b0c18910319a3ced716.tar
yuzu-8723cc87982825754f314b0c18910319a3ced716.tar.gz
yuzu-8723cc87982825754f314b0c18910319a3ced716.tar.bz2
yuzu-8723cc87982825754f314b0c18910319a3ced716.tar.lz
yuzu-8723cc87982825754f314b0c18910319a3ced716.tar.xz
yuzu-8723cc87982825754f314b0c18910319a3ced716.tar.zst
yuzu-8723cc87982825754f314b0c18910319a3ced716.zip
-rw-r--r--src/core/telemetry_session.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp
index f29fff1e7..68edb24f5 100644
--- a/src/core/telemetry_session.cpp
+++ b/src/core/telemetry_session.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <array>
+
#include "common/assert.h"
#include "common/common_types.h"
#include "common/file_util.h"
@@ -28,11 +30,11 @@ static u64 GenerateTelemetryId() {
mbedtls_entropy_context entropy;
mbedtls_entropy_init(&entropy);
mbedtls_ctr_drbg_context ctr_drbg;
- std::string personalization = "yuzu Telemetry ID";
+ constexpr std::array<char, 18> personalization{{"yuzu Telemetry ID"}};
mbedtls_ctr_drbg_init(&ctr_drbg);
ASSERT(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
- reinterpret_cast<const unsigned char*>(personalization.c_str()),
+ reinterpret_cast<const unsigned char*>(personalization.data()),
personalization.size()) == 0);
ASSERT(mbedtls_ctr_drbg_random(&ctr_drbg, reinterpret_cast<unsigned char*>(&telemetry_id),
sizeof(u64)) == 0);