summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/xmake/string/lower.c2
-rw-r--r--core/src/xmake/string/upper.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/xmake/string/lower.c b/core/src/xmake/string/lower.c
index 1837d81ec..ef43f2385 100644
--- a/core/src/xmake/string/lower.c
+++ b/core/src/xmake/string/lower.c
@@ -52,7 +52,7 @@ tb_int_t xm_string_lower(lua_State *lua) {
}
// copy string to buffer
- tb_char_t* buffer = tb_malloc_bytes(size + 1);
+ tb_char_t* buffer = (tb_char_t*)tb_malloc_bytes(size + 1);
if (buffer) {
tb_memcpy(buffer, cstr, size);
buffer[size] = '\0';
diff --git a/core/src/xmake/string/upper.c b/core/src/xmake/string/upper.c
index ba625bde4..b9b71b349 100644
--- a/core/src/xmake/string/upper.c
+++ b/core/src/xmake/string/upper.c
@@ -52,7 +52,7 @@ tb_int_t xm_string_upper(lua_State *lua) {
}
// copy string to buffer
- tb_char_t* buffer = tb_malloc_bytes(size + 1);
+ tb_char_t* buffer = (tb_char_t*)tb_malloc_bytes(size + 1);
if (buffer) {
tb_memcpy(buffer, cstr, size);
buffer[size] = '\0';