fix wrong type of cast in C++ version of string.h

Tue, 11 Nov 2025 18:43:08 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 11 Nov 2025 18:43:08 +0100
changeset 1488
946895d19dde
parent 1487
0ff535033b78
child 1489
185dc2a4b45c

fix wrong type of cast in C++ version of string.h

src/cx/string.h file | annotate | diff | comparison | revisions
--- a/src/cx/string.h	Tue Nov 11 18:39:18 2025 +0100
+++ b/src/cx/string.h	Tue Nov 11 18:43:08 2025 +0100
@@ -256,7 +256,7 @@
 }
 cx_attr_nodiscard
 CX_CPPDECL cxstring cx_strcast(const unsigned char *str) {
-    return cx_str(static_cast<const char*>(str));
+    return cx_str(reinterpret_cast<const char*>(str));
 }
 extern "C" {
 #else

mercurial