tremulous/tremulous-1.2.0~test.3-sol-gcc-11.1.0.patch

48 lines
1.4 KiB
Diff
Raw Permalink Normal View History

--- tremulous-1.2.0-test.3/src/sol/sol.hpp.orig 2021-06-06 18:11:40.972505977 +0200
+++ tremulous-1.2.0-test.3/src/sol/sol.hpp 2021-06-06 19:28:27.332544204 +0200
@@ -6100,7 +6100,7 @@
}
static int push(lua_State* L, const wchar_t* wstr, std::size_t sz) {
- return push(L, wstr, wstr + sz);
+ return push(L, wstr, (const wchar_t*)(wstr + sz));
}
static int push(lua_State* L, const wchar_t* strb, const wchar_t* stre) {
@@ -6166,7 +6166,7 @@
}
static int push(lua_State* L, const wchar_t(&str)[N], std::size_t sz) {
- return stack::push<const wchar_t*>(L, str, str + sz);
+ return stack::push<const wchar_t*>(L, (const wchar_t*)str, str + sz);
}
};
@@ -6177,7 +6177,7 @@
}
static int push(lua_State* L, const char16_t(&str)[N], std::size_t sz) {
- return stack::push<const char16_t*>(L, str, str + sz);
+ return stack::push<const char16_t*>(L, (const char16_t*)str, str + sz);
}
};
@@ -6188,7 +6188,7 @@
}
static int push(lua_State* L, const char32_t(&str)[N], std::size_t sz) {
- return stack::push<const char32_t*>(L, str, str + sz);
+ return stack::push<const char32_t*>(L, (const wchar_t*)str, str + sz);
}
};
@@ -6212,7 +6212,7 @@
struct pusher<char32_t> {
static int push(lua_State* L, char32_t c) {
const char32_t str[2] = { c, '\0' };
- return stack::push(L, str, 1);
+ return stack::push(L, (const char32_t*)str, 1);
}
};