From d66cc3b7aeaf2ca5c0a5bff1cffe9e464907bea6 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 17 May 2021 22:47:08 +0100 Subject: [PATCH] Fix undefined behaviour --- extern/Base64/Base64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/Base64/Base64.h b/extern/Base64/Base64.h index cdfdc04d0b..498d2be128 100644 --- a/extern/Base64/Base64.h +++ b/extern/Base64/Base64.h @@ -48,7 +48,7 @@ class Base64 { size_t out_len = 4 * ((in_len + 2) / 3); std::string ret(out_len, '\0'); size_t i; - char *p = const_cast(ret.c_str()); + char *p = ret.data(); for (i = 0; i < in_len - 2; i += 3) { *p++ = sEncodingTable[(data[i] >> 2) & 0x3F];