1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

DPP update fixes.

This commit is contained in:
Sandu Liviu Catalin 2021-09-18 21:24:49 +03:00
parent b978bc5046
commit e3c32e4788
4 changed files with 6 additions and 4 deletions

View File

@ -192,7 +192,7 @@ static const EnumElement g_DpVoiceStateFlagsEnum[] = {
{_SC("SelfDeaf"), static_cast< SQInteger >(dpp::vs_self_deaf)}, {_SC("SelfDeaf"), static_cast< SQInteger >(dpp::vs_self_deaf)},
{_SC("SelfStream"), static_cast< SQInteger >(dpp::vs_self_stream)}, {_SC("SelfStream"), static_cast< SQInteger >(dpp::vs_self_stream)},
{_SC("SelfVideo"), static_cast< SQInteger >(dpp::vs_self_video)}, {_SC("SelfVideo"), static_cast< SQInteger >(dpp::vs_self_video)},
{_SC("Supress"), static_cast< SQInteger >(dpp::vs_supress)}, {_SC("Suppress"), static_cast< SQInteger >(dpp::vs_suppress)},
}; };
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -350,7 +350,7 @@ static const EnumElement g_DpStickerFormatEnum[] = {
static const EnumElement g_DpMessageFlagsEnum[] = { static const EnumElement g_DpMessageFlagsEnum[] = {
{_SC("Crossposted"), static_cast< SQInteger >(dpp::m_crossposted)}, {_SC("Crossposted"), static_cast< SQInteger >(dpp::m_crossposted)},
{_SC("IsCrosspost"), static_cast< SQInteger >(dpp::m_is_crosspost)}, {_SC("IsCrosspost"), static_cast< SQInteger >(dpp::m_is_crosspost)},
{_SC("SupressEmbeds"), static_cast< SQInteger >(dpp::m_supress_embeds)}, {_SC("SuppressEmbeds"), static_cast< SQInteger >(dpp::m_suppress_embeds)},
{_SC("SourceMessageDeleted"), static_cast< SQInteger >(dpp::m_source_message_deleted)}, {_SC("SourceMessageDeleted"), static_cast< SQInteger >(dpp::m_source_message_deleted)},
{_SC("Urgent"), static_cast< SQInteger >(dpp::m_urgent)}, {_SC("Urgent"), static_cast< SQInteger >(dpp::m_urgent)},
{_SC("Ephemeral"), static_cast< SQInteger >(dpp::m_ephemeral)}, {_SC("Ephemeral"), static_cast< SQInteger >(dpp::m_ephemeral)},

View File

@ -134,7 +134,7 @@ void Register_DPP_Other(HSQUIRRELVM vm, Table & ns)
.Prop(_SC("IsSelfDeaf"), &DpVoiceState::IsSelfDeaf) .Prop(_SC("IsSelfDeaf"), &DpVoiceState::IsSelfDeaf)
.Prop(_SC("SelfStream"), &DpVoiceState::SelfStream) .Prop(_SC("SelfStream"), &DpVoiceState::SelfStream)
.Prop(_SC("SelfVideo"), &DpVoiceState::SelfVideo) .Prop(_SC("SelfVideo"), &DpVoiceState::SelfVideo)
.Prop(_SC("IsSupressed"), &DpVoiceState::IsSupressed) .Prop(_SC("IsSuppressed"), &DpVoiceState::IsSuppressed)
); );
} }

View File

@ -42,7 +42,7 @@ char* strptime(const char* s, const char* f, struct tm* tm) {
input.imbue(std::locale(setlocale(LC_ALL, nullptr))); input.imbue(std::locale(setlocale(LC_ALL, nullptr)));
input >> std::get_time(tm, f); input >> std::get_time(tm, f);
if (input.fail()) { if (input.fail()) {
return ""; return const_cast<char*>("");
} }
return (char*)(s + input.tellg()); return (char*)(s + input.tellg());
} }

View File

@ -386,6 +386,8 @@ int close_socket(socket_t sock) {
if (sock >= 0 && sock < FD_SETSIZE) { if (sock >= 0 && sock < FD_SETSIZE) {
return closesocket(sock); return closesocket(sock);
} }
assert(0);
return -1;
#else #else
return close(sock); return close(sock);
#endif #endif