1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Remove String clipping constructors.

Callers should instead call constructors with explicit encoding names, with known length `Span`.
This commit is contained in:
Lukas Tenbrink
2025-03-14 16:54:44 +01:00
parent b377562b52
commit a23f630781
12 changed files with 24 additions and 41 deletions

View File

@@ -212,7 +212,8 @@ String X509CertificateMbedTLS::save_to_string() {
int ret = mbedtls_pem_write_buffer(PEM_BEGIN_CRT, PEM_END_CRT, cert.raw.p, cert.raw.len, w, sizeof(w), &wrote);
ERR_FAIL_COND_V_MSG(ret != 0 || wrote == 0, String(), "Error saving the certificate.");
buffer += String((char *)w, wrote);
// PEM is base64, aka ascii
buffer += String::ascii(Span((char *)w, wrote));
crt = crt->next;
}
if (buffer.length() <= PEM_MIN_SIZE) {